Test Complete Object Mapping different with different executions
I have a weird problem, where the object i am trying to access changes between the following two.
I have sys.process("msiexec") and sys.process("msiexec", 2), which heaviliy interchanges, when i execute it.
Is there any amart way of finding the type of msiexec process, that is being executed, which would solve the problem that I have.
Thanks in advance
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.htmlYou'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.