Micro Focus QTP (UFT) Forums
help with wait property function - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: help with wait property function (/Thread-help-with-wait-property-function)



help with wait property function - kp_usa - 12-20-2012

Hi on line 4 I want the start button to wait for 10 senconds. Please help me how to write the wait property function for this purpose?






Code:
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |").WebEdit("j_username").Set "cn=directory manager"
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |").WebEdit("j_password").SetSecure "50d23f85a4c11bce185d27cad48ae435a2125887d201a972"
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |").WebButton("Login").Click
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |_2").WebButton("Start").Click
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |_2").WebButton("Stop").Click
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |_2").Link("Logout").Click



RE: help with wait property function - diya - 12-20-2012

Syntax of wait property is

Code:
WaitProperty("Property Name","PropertyValue",Timeout in millisec)

Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |_2").WebButton("Start").WaitProperty("enabled","true",200)
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |_2").WebButton("Start").Click


try out.....sorry if iam wrong


RE: help with wait property function - skozer - 12-20-2012

Do you mean 10 seconds? Just add "wait(10)" before you click "Start" button.


Code:
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |").WebEdit("j_username").Set "cn=directory manager"
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |").WebEdit("j_password").SetSecure "50d23f85a4c11bce185d27cad48ae435a2125887d201a972"
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |").WebButton("Login").Click
wait(10)
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |_2").WebButton("Start").Click
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |_2").WebButton("Stop").Click
Browser("Radiant Logic, Inc. |").Page("Radiant Logic, Inc. |_2").Link("Logout").Click



RE: help with wait property function - kp_usa - 12-20-2012

Thanks everybody for your kind support.