And now QTP will wait up to 20 seconds for that WinEdit to become enabled before it moves on to the next line (but will move on immediately when it is enabled without waiting the full 20 seconds, so if it is enabled at 5 seconds, QTP will only wait those 5 seconds then move on).
No recording necessary.
You can also modify the WaitProperty statement like this:
x = Window("YourApplication").Dialog("YourAppDialog"). WinEdit("SomeEditField").WaitProperty("enabled", "True", 20)
Then use an if..then to check the value of x. It will be true if "enabled" was true before 20 seconds expired, or false if 20 seconds ran out before the WinEdit was enabled. If true, run the .Set "Hello World" else send a Reporter.ReportEvent to the test log to indicate what went wrong.
"The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"
Thank you very much. This is exactly what I am looking. I need to wait for multiple fields. Where as wait statement doesn't have flexibility it always wait for the whole designated time. Thank you very much for the help.