Hello Adrian,
I am looking for exactly the same thing as you are. In QTP (UFT), there is Exist with timeout parameter which does not "judge" whether object was found or not and I consider this approach as the correct one since it should be up to you whether you see the result of Exist function relevant or not based on the situation.
For instance, if I am trying to log in some application, succesful login is checked by identification of some object which is available only if I put correct username and password and everything went well with login. However, there could be various outcomes :
- warning message telling me about wrong username
- warning message telling me about wrong password
- warning that my password is going to expire soon
- error dialog which is not critical - needs to be confirmed - and you can continue
now try to imagine that in some situations (different than login), these object can be individual objects - so they do not share the same parrent. You do not know in advance what objects you are dealing with... webObject or .NET object... they are parameters which you wish to evaluate if needed. You just need to know if they exist or not and you are not sure in which hierarchy they are.
That is exactly why Exist(timeout) function in QTP (UFT) is so helpful. It keeps on you what you do with result.
The only way how to simulate this kind of behaviour in testComplete is somehow bend waitxxx functions and combined it with "superParent" = Sys. I do not have solution yet, but I believe I will go that direction.
I let you know if I find solution
Lukas
:-)