Forum Discussion

ssv's avatar
ssv
Occasional Contributor
7 years ago

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

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    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.

    • ssv's avatar
      ssv
      Occasional Contributor

      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!

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    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.)

    • ssv's avatar
      ssv
      Occasional Contributor

      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.