Forum Discussion
TestComplete 11.31. I could upgrade it to 12.XX but decided to stay with 11.31 as in the past when I upgraded the main version of TestComplete, some of the test scripts would stop working and needed to update.
Also as I mentioned in my original post, checking for not null or null does not throw any error but I need to know if checking for not null will guarantee no problem accessing the properties of the objects.
I tried this on the niewPort and it worked so far as viewPort has been alwasy found.
- AlexKaras5 years agoChampion Level 3
Hi,
> I need to know if checking for not null will guarantee no problem accessing the properties of the objects.
No. As it is documented, .FindXXX() method always returns found object or object stub if the search finds nothing.
Thus check for not null will always succeed.
Correct way is to check for object.Exists and use aqObject.IsSupported(...) when needed.
- SZ_15 years agoOccasional Contributor
At AlexKaras
Thanks for your reply. I had realised that after I posted the messages and I already pointed this out on this thread on stackoverflow:
https://stackoverflow.com/questions/55857445/sometimes-exists-property-is-not-supported
- TanyaYatskovska5 years agoSmartBear Alumni (Retired)
Hi SZ_1,
One more thing to check - make sure that the Auto-wait timeout option is set to more than 10000 in your project. You can find the details here: https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/properties/playback.html
- SZ_15 years agoOccasional Contributor
Thanks TanyaGormunova! I have already had the Auto-wait timeout set to 10000 ms. Also I don't stop test run on error. However, the test will stop if a runtime error occurs like this one.