Forum Discussion
AlexKaras
Champion Level 1
7 years agoHi,
a) No way. You must search within a loop and exit when the sought for object is found or timeout elapses;
b) Search by XPath is highly not recommended for TestComplete. Consider .FindXXX() methods instead. .FindChildEx() method has a parameter to specify the thing that you are looking for;
c) Your code is not correct. See the Result Value section of the FindChildByXPath() help topic - if the sough for object is not found then null is returned. (And if found, then either TC object that contains .Exists property or native DOM object that does not contain .Exists may be returned depending on what exact object was found.)