Synchronization point is the time interface between Tool and Application under test. Synchronization point is a feature to specify delay time between one step and another of the test script.
Method 1: WaitProperty
WaitProperty is a method that takes the property name, Value and Timeout value as input to perform the sync. It is a dynamic wait and hence this option is encouraged.
Eg :
obj.Link("Google").WaitProperty "text", "Browse",25000
Method 2: Exist
Exist is a method that takes the Timeout value as input to perform the sync. Again it is a dynamic wait and hence this option is encouraged.
Eg : obj.Link("Google").Exist(30)
Method 3: Wait
Wait is a hardcoded or static sync point which waits independent of the event happened or NOT. Hence usage of Wait is discouraged and can be used for shorter wait time such as 1 or 2 seconds.
Eg : wait(30)
Wait() statement without specifying the seconds will make QTP wait up to maximum time, even though operations is completed.
Method 4: Sync Method
Sync Method can be used only for web applications where there is always a lag between page loads.
Eg : Browser("Math Calculator").Sync
Method 5 : Default Synchronization:
When user hasn't used any of the above sync methods, still QTP has inbuild Object synchronization timeout which can be adjusted by the user.
Navigate to "File" >> "Settings" >> Run Tab >> Object Synchronization Time out. Here we can give the time we want QTP to wait for.
Method 1: WaitProperty
WaitProperty is a method that takes the property name, Value and Timeout value as input to perform the sync. It is a dynamic wait and hence this option is encouraged.
Eg :
obj.Link("Google").WaitProperty "text", "Browse",25000
Method 2: Exist
Exist is a method that takes the Timeout value as input to perform the sync. Again it is a dynamic wait and hence this option is encouraged.
Eg : obj.Link("Google").Exist(30)
Method 3: Wait
Wait is a hardcoded or static sync point which waits independent of the event happened or NOT. Hence usage of Wait is discouraged and can be used for shorter wait time such as 1 or 2 seconds.
Eg : wait(30)
Wait() statement without specifying the seconds will make QTP wait up to maximum time, even though operations is completed.
Method 4: Sync Method
Sync Method can be used only for web applications where there is always a lag between page loads.
Eg : Browser("Math Calculator").Sync
Method 5 : Default Synchronization:
When user hasn't used any of the above sync methods, still QTP has inbuild Object synchronization timeout which can be adjusted by the user.
Navigate to "File" >> "Settings" >> Run Tab >> Object Synchronization Time out. Here we can give the time we want QTP to wait for.
No comments:
Post a Comment