Error "Object doesn't support this property or method" using .Exists of returned object from Find
I have suddenly started getting the error "Object doesn't support this property or method" at the statements .Exists of returned object from Find method. This is a widespread issue to a lot of different objects. The only way I know to get the test working is to change the statement to check the returned object for not null.
1. I don’t know if checking for not null will guarantee no problem accessing the properties of the objects.
2. This means I have to go through the whole test suite to change all of such statements
Re: Error "Object doesn't support this property or method" using .Exists of returned objec
What's changed between when it worked and when it failed? Did you upgrade TestComplete?
You are correct, the Find method is supposed to return a stub object if the object is not found with "Exists" as false. So, something changed here. A possibility could be that ViewArea (what you're calling the Find method from) failed at some point... you may have lost that object somewhere as well which would cause a number of issues. Double check further up the script for fail points prior to this.
Robert Martin [Hall of Fame] Please consider giving a Kudo if I write good stuff ----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group. I love good food, good books, good friends, and good fun.
As I mentioned in my post, this happened to many objects not just this one. In all cases where the error occurred, the objects were found with Exists propertt being either False or True. The only change I can think of is to have .Net framework 4.8 installed. The error started after that.