Test Complete Object Mapping different with different executions
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Basically, all that means is that you have two instances of that process running. What I would do, if possible, is wait for one instance to complete before starting up another one.
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.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you describe your use case with more details? msiexec is Windows installer process and indeed there are 2+ msiexec processes in the system when some piece of software is been installed.
The actual concern is: do you *really* need to interact with the installer's UI? Is it your actual task to go through the UI while installing the software? If you need just to install the software, this can be done unattended from the command line and without the necessity to interact with installer's UI. (And the latter is the recommended and more preferable approach when you do not do verification of the installer's UI.)
/Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex,
Sorry for the very late reply. Have been busy with a lot of stuffs lately.
so answering your questions, yes i need to interact with the installer's UI. There are settings on installer UI that I particularly need to automate.
We already have a base version, say version v1, which is installed through the command line parameters. And then we try to install the latest version say, version v2.
This needs to automated, mainly because we want to automate the way the normal user would do.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the following syntax
If Sys.Process("msiexec", 2).Form("product*").Exists Then Set qvProcess = Sys.Process("msiexec", 2).Form("product*") Else If Sys.Process("msiexec").Form("product*").Exists Then Set qvProcess = Sys.Process("msiexec").Form("product*") End If End If
the above syntax solves the problem that i have, but with a minor setback. when entering the loop statement, the Test Complete tries to wait for the object, and as it will not be there, it throws an error
Unable to find the object Form("product*")
and then goes to the else statement and finds the object. Is it possible for me to supress the error somehow, or is there any other ways for me to solve this error?
Thanks in advance!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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/waitch...)
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
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.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 If
Might have to tweak it a little but the If Not is important so it doesn't get caught in the error.
