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)
...