Forum Discussion

dbruning's avatar
dbruning
New Contributor
15 years ago

"The underlying object does not exist" with MSIEXEC

Hi,





Just wanted to register a problem & solution I came across trying to automate an MSI installer created with InstallShield.





The root of the problem is that when the installer runs, it actually spawns off two processes, both named MSIEXEC (one running as SYSTEM, one running as the current logged-in user). This confuses the hell out of TestComplete's name mapping - it wants to use the "index" property to disambiguate between the two, but unfortunately it seems a matter of luck as to which MSIEXEC process gets index=1 and which gets index=2.





So after several hours trying to figure out why my recorded scripts sometimes ran & sometimes didn't, I finally noticed the second MSIEXEC process, and was able to disambiguate by ticking the "required child" property of the MSIEXEC mapped object for one of its child windows. The process I actually want to automate has the child window, the process running as SYSTEM doesn't have any.





Hope this saves someone some time!





Cheers,





Darren.

7 Replies

  • E staff and beauty!


    I am also having problems automating a MSI installer created with InstallShield.


    In generating the scripts I came across the property of  msiexec.wndMsiDialogCloseClass , I do not know how  work around this problem


    When I start the automation, o TestComplete does not recognize the

    "msiexec.wndMsiDialogCloseClass property".


    The TestComplete not recognize the actual name of the form.


    Anyone know how I can work around this problem,  because every time I run the test, TestComplete does not recognize the form and send ERROR


    Following is the code generated by low TestComplete.


     Set wndMsiDialogCloseClass = Aliases.msiexec.wndMsiDialogCloseClass


    Awaiting Return.

  • Hi,



    If you face an "object not found" error, a link to the corresponding help topic should be posted to the test log. Have you tried following the suggestions provided in the help topic, a link to which has been posted to your test log? What were the results? If the help topic was not enough for you to find the cause of the problem, let us know what problems you faced while diagnosing the problem so we can improve our documentation.



    BTW, a list of the corresponding help topics (depending on specific error messages) can be found in the Handling the 'Object Not Found' Errors help topic. Suggestions provided in the "Handling the 'Object Does Not Exist' Error" topic are usually enough to diagnose such problems.
  • @ Jared


    THE ERROR I mentioned, refers to the end of the test run, ie

    TestComplete is not able to capture o form with a Property "msiexec.wndMsiDialogCloseClass"

    Every time get to that point he not recognize this property and if loses.


    I am not able to treat this property "msiexec".


    Thanks.

  • Hi,



    There're two 'wndMsiDialogCloseClass' objects - 'wndMsiDialogCloseClass' and 'wndMsiDialogCloseClass1'. This means that the target object was remapped because the properties by which it is recognized do not provide stable recognition. By what properties are the 'wndMsiDialogCloseClass' and 'wndMsiDialogCloseClass1' objects mapped and what values are used in Name Mapping?



    Also, when you get the error, what is posted to its 'Additional information' section in the log?
  • I do not know how to map this property.

    I'll reformulate my question, in my code has a line of code that the TestComplete does not recognize,ie, getting lost.


     Below is my Code. In Points "underline"  o TesComplete not is recognizing my Code or not  can map the property correct of applying.  


    ######


    Sub InstalacaoFPw '''''' Não esta Funcionando Corretamente

     



    Dim FrmLGInstalador, FrmLGInstalador1, FrmLGInstalador2, FrmLGInstalador3, FrmLGInstalador4


    Dim BtnAvancar, BtnAvancar1, BtnCancelar, BtnSim, BtnNao, TpSelecao


     


     


    Call TestedApps.Instala__o_FPw.Run(1, True)


    Delay(2000)


    Set FrmLGInstalador = Aliases.LGInstalador1.wndWindowsForms10Window8app011c7a8c


    Set FrmLGInstalador1 = Aliases.LGInstalador.wndWindowsForms10Window8app033c0d9d.WindowsForms10SysTabControl32app033c0d9d


    Set FrmLGInstalador2 = Aliases.LGInstalador1.wndWindowsForms10Window8app033c0d9d


    Set FrmLGInstalador3 = Aliases.LGInstalador1.wndWindowsForms10Window8app011c7a8c.WindowsForms10SysTabControl32app011c7a8c.tpSelecao.WindowsForms10ToolbarWindow32app011c7a8c


    Set FrmLGInstalador4 = Aliases.msiexec.wndMsiDialogCloseClass '''' Formulario que nao Funciona


     


    Set BtnAvancar = FrmLGInstalador.btnAvan_ar


    Set BtnCancelar = FrmLGInstalador2.btnCancelar


    Set BtnAvancar1 = FrmLGInstalador4.btnAvan_ar


    Set BtnSim = Aliases.LGInstalador1.dlgLGInstalador.btnSim


    Set TpSelecao = FrmLGInstalador3


     


    If BtnAvancar.Enabled Then


     


    BtnAvancar.ClickButton


    Log.Message("Botão 'Avançar'")


    Else


     


    Log.Message("Botão 'Cancelar'")


    BtnCancelar.ClickButton


    BtnSim.ClickButton


    End If


     


     


    Call TpSelecao.ClickItem("Todos", False)



    ' Call TpSelecao.ClickItem("|FPW Arquivos de Sistema - Versão 2011.1", False)


    ' Call TpSelecao.ClickItem("|FPW Folha de Pagamento Servidor - Versão 2011.1", False)


    ' Call TpSelecao.ClickItem("|FPW Folha de Pagamento Cliente - Versão 2011.1", True)


     



    BtnAvancar.ClickButton


     


    '''' Formulario que nao Funciona

    BtnAvancar1.ClickButton



    End Sub

    #########





     What should I do.


     Thanks.

  • Hi,



    I do not know how to map this property.


    You need to open the Name Mapping editor by clicking the NameMapping item in the Project Explorer. Then, find the 'wndMsiDialogCloseClass' object in the tree of mapped objects. Click it. Look at its properties. Remove properties that can change their values (such as Index). Replace any dynamic parts of all properties with wildcards. For example, if you have WndCaption whose value is "Something stable - a file name or anything else which can change", replace it with "Something stable*".

    The way you can edit recognition parameters is described in the Modifying Mapping Criteria help topic.



    Also, I recommend that you view this webinar recording to understand how object recognition works.
  • @ Jared


     I managed to make the correct mapping, following the steps below.


     Now I am more relaxed.


    To do this, find the MSIEXEC mapping name in the Mapped Objects tree of the Name Mapping editor, remove the Index property from the list of the mapping properties, open the Required Children panel and check the wndMsiDialogCloseClass item.


    Thank you for Help.