What is Synchronization?
During Test Execution, QTP gives certain instructions which need to be sync' ed with AUT. This is Synchronization.
When you run tests, your application may not always respond with the same speed. For eg a Progress bar to reach 100% or a pop up message to open.
We can handle these anticipated timing problems with some adjustment to make sure that QTP waits until our application is ready before performing certain steps.
This Adjustment is Synchronization.
5 Ways to perform Synchronization:
1. inserting wait statement
eg wait(10)
2. inserting synchronization point
Step 1: Start Recording
Step 2: Display screen/Page in your application where you want to put Synchronization
Step 3: Choose insert> Step> Synchronization Point
(Mouse Pointer Turns into Pointed Hand)
Step 4: Click the object in your Application for which you want to insert Synchronization.
(If Location you Clicked, contains more than 1 object, Object Selection Synchronization
Point Dialog Box opens)
Step 5: Select the Object and Click OK.
(Add Synchronization Dialog Box opens)
Step 6: Property name list contains the test object properties associated with the object. Enter
property value for which QTP should wait before continuing to next step.
Step 7: Enter Synchronization Time Out in milliseconds. Click OK
It will look like:
window ("Flight Reservation").winButton ("update order").waitproperty "enabled",1, 3000
3.increase Tool Default Sync Time
From the path File> Settings> Run Tab> increase object Synchronization Time Out> Apply> OK.
4.Using Exist Property
eg y= Window ("Flight Reservation"). Dialog ("Flight Table"). exists
5.Sync Method (Only for Web)
eg. Browser ("Yahoo!"). Page ("Yahoo Toolbar"). sync
No comments:
Post a Comment