Forum Discussion
Imagine this scenario - you have two name-mapped objects in TestComplete - Object1, which is currently visible in the Object Browser (i.e. present in memory), and Object2, which is not visible (i.e. not in memory at the moment).
When you run the check:
if (Object1.Exists)
TestComplete finds Object1 already in memory, so it can immediately access its properties (like .Exists, .Visible, etc.) and quickly return true.
However, for:
if (Object2.Exists)
Since Object2 is not currently in memory, TestComplete doesn't immediately know whether it exists or not. So it enters a waiting state - controlled by the Auto-wait timeout setting (default: 10 seconds under Tools > Options > Playback > Runtime). During this time, TestComplete repeatedly tries to find Object2 in the application.
This is the issue that you are facing. To resolve this issue use one of the WaitNNN methods. For example,
var obj = object.WaitAliasChild("Object2", 1000); // Wait up to 1 seconds
if (obj.Exists)
...
- lowres10 days agoOccasional Contributor
Im not sure thats what is going on.
I am not looking for Object2, I am only looking for Object1.
So I go to my form check if Object1 exists then I go to another form and check if Object1 exists etc etc.If Form 1 does not have the object it takes for ever to say so. Why would it have have object1 in memory since the form does not contain object1.
My Auto wait is 500ms..... why does it wait 2 minutes?- rraghvani10 days ago
Champion Level 3
I was giving a brief description of how TestComplete works (and generally how programming works). Hence "Imagine this scenario".
It's difficult to provide a possible solution without seeing the actual code, Object Browser and the UI objects you are trying to interact with.
- lowres10 days agoOccasional Contributor
Tried using the WaitAliasChild Method with the same result.
Thanks for your insights, ill keep looking maybe it will click suddenly.