01-30-2010, 09:17 PM
Hi ,
Use "WaitProperty" method.
Refer the below example:
The following example uses the 'WaitProperty' method to wait for the required WebButton's 'readyState' property to be complete or for 10 seconds (10000 milliseconds) to pass, whichever comes first.
If the WebButton achieves this value for '4' seconds itself, then QTP clicks the button & ignores the remaining '6' seconds.
Example:
Use "WaitProperty" method.
Refer the below example:
The following example uses the 'WaitProperty' method to wait for the required WebButton's 'readyState' property to be complete or for 10 seconds (10000 milliseconds) to pass, whichever comes first.
If the WebButton achieves this value for '4' seconds itself, then QTP clicks the button & ignores the remaining '6' seconds.
Example:
Code:
If Browser("....").Page("....").WebButton("....").WaitProperty("readyState", "Complete", 10000) Then
Browser("....").Page("....").WebButton("....").Click
End If