How to wait for a button to continue
Hello, I am new to TestComplete and scripting, please forgive me asking stupid questions.
I have a test that is going to click on a button on a web page, which will take me to the next page, and I will need to click on another button on the second page to continue the test. However, if I just script 2 click actions, it will perform the first click, and error out on the second click saying because the object not exist, so I guess it may need to take a few seconds to load the second button, so I used waitproperty method, but it still don't work, I can see the button is showing on the page and enabled, but the waitproperty method just keep waiting and waiting and then times out.
Here are my VBscripts, can anyone please help me out?
If Aliases.browser.WebStore_BillingInformation.ProceedWithOrder.WaitProperty("Enable", True, 20000) Then
Log.Message "Button Not Found"
Solved! Go to Solution.
If Aliases.browser.WebStore_BillingInformation.ProceedWithOrder.WaitProperty("Enable", True, 20000)
I would do the following
If Aliases.browser.WebStore_BillingInformation.WaitAliasChild("ProceedWithOrder", 20000).Exists
first to make sure that the object DOES exist within the appropriate timing.
Secondly, then I'd add the check for "Enabled"... note that the property name is Enabled not Enable. There is a difference.
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider