Forum Discussion
tristaanogre
14 years agoEsteemed Contributor
The reason for this is that in the case where the object does not exist, you cannot call the "Exists" property. Just like you can't call the "Name" property for a non-existant object.
The WaitWPFObject method, if the object does not exist, will return an empty object with an Exists property that is set to false. Meanwhile, WaitWPFObject will wait up until the Auto-wait timeout for the object to exist while WPFObject tries to get it immediately.
The WaitWPFObject method is actually the recommended method to use to test "Exists" for this reason.
The WaitWPFObject method, if the object does not exist, will return an empty object with an Exists property that is set to false. Meanwhile, WaitWPFObject will wait up until the Auto-wait timeout for the object to exist while WPFObject tries to get it immediately.
The WaitWPFObject method is actually the recommended method to use to test "Exists" for this reason.