Test Complete Object Mapping different with different executions
- 7 years ago
This is a common problem. The problem can be summed up as such:
You cannot check the value of the "Exists" property of an object if it doesn't exist. If you think about it, it makes sense... how can you check ANY property of a non-existant object?
For your situation, I'd look into using "WaitChild" for your check for existance. (https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/waitchild-method.html)
Also, review this topic as it covers this problem in more general terms.
https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/checking-existence.html - 7 years ago
You'll need to use an If Not for the first statement
i.e.
If Not Sys.Process("msiexec", 2).Form("product*").Exists Then Set qvProcess = Sys.Process("msiexec").Form("product*") ElseIf Sys.Process("msiexec", 2).Form("product*").Exists Then Set qvProcess = Sys.Process("msiexec", 2).Form("product*")
End IfMight have to tweak it a little but the If Not is important so it doesn't get caught in the error.