QAintern
15 years agoOccasional Contributor
A Better Way to Find Objects
I'm working on ways for TestComplete to find objects by looping until they actually exist, since the WaitWinFormsObject and WaitMSAAObject and so forth, don't seem to work very well and I don't want to have timed waits. And infinite waits are useless when Testcomplete can't find the object 25% of the time (this leads to TC looping for hours until I stop the tests).
A few ideas I've tried:
1. A looping refresh until the item .exists (This works but posts an error to the log (.exists is possibly the most useless property of any object as it will error because the object does not exist... duh!)
***If anyone knows of a way to suppress this error, please let met know :) ***
2. Looping until the childcount of the parent object is >= number (this essentially will wait for the object tree to be created, if only I could get it to work)
I'm lost on further ideas...