Ask a Question

TestComplete waits for object before using it for the first time

Occasional Contributor

TestComplete waits for object before using it for the first time

Hi all, I've got this snippet of code:


Aliases.browser.pageSecuritydetails.formSecurityDetails.passwordbox2TheAnswerIsAnswer.WaitProperty("Enabled", true, 500);


When running this code, TestComplete will "wait for object" for about 20 seconds as if it can't find the object and then run the first line, after that it will run the rest of the lines fine and always find the object. This always happens no matter what the first line is, anything that uses this object will want to wait first.


I've tried refreshing the namemap and/or the object hierarchy before hand using the below lines and it will still do this wait before even doing those





Does anyone have any idea how I could stop this happening? This script is run before all our tests and its significantly slowing things down


I've attached the full script


Thank you all πŸ™‚

Community Hero

If you step through these three lines of code using Debug, where do you see the waiting actually happening?

[Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
Occasional Contributor

stepping through it the wait happens when the first line that uses this object runs, so in the code above it runs on click()

Occasional Contributor

Ok, I switched from using web objects (Xpath and css selectors) to just using TestComplete objects and its solved the issue, not sure why

Showing results forΒ 
Search instead forΒ 
Did you mean:Β