Forum Discussion
I agree with the other feedback regarding the mismatched data types being responsible for your trouble. You should be comparing Boolean values with cmpEquals rather than cmpContains.
Something else to keep in mind it "Exists" and "Visible" are not the same thing. To an end user they are effectively the same because either they do, or they don't, see something.
However, from a development/implementation perspective UI elements can exist, but be hidden. In that case you need to make sure you're checking the right property or else you won't get the results you're expecting. I've made the mistake of checking for exists when what I really wanted was "Visible" or "VisibleOnScreen".
Last but not least, checking if something exists can cause a performance hit equal to you auto-wait setting in any case where it doesn't exist. TestComplete always waits the full amount of time set in the auto-wait when checking if something exists. You may want to adjust the wait period down in some cases using a custom timeout.
Here is the relevant help topic: Specifying Custom Timeouts For Operations | TestComplete Documentation
For instance, is waiting two seconds long enough to verify whether it exists or not? If so, setting the custom timeout will improve your test performance.
Related Content
Recent Discussions
- 4 days ago
- 4 days ago
- 8 days ago