Forum Discussion
Delay did not work. I already tried different times of delay even as long as 1000, 2000.
I have found a workaround:
If I access a different property e.g. Name before access Exists, there is no error at .Exists:
The problem is that I need to add this .Name line everywhere before .Exists statements for all of the objects.
Hope this helps you to find some clues what might be the cause.
Hmmm. This sounds strange.
Are you using TestComplete 14.20? This is the latest product version. I think it's worth checking it.
- 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
- SZ_15 years agoOccasional Contributor
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.
- SZ_15 years agoOccasional Contributor
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.
- 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.