Forum Discussion

Inok's avatar
Inok
Occasional Contributor
13 years ago

Testing MSI Installer does not recognize button

I am evaluating TestComplete with the scope of testing a WPF application and the msi installer. I made some redorded tests with the wpf application which works fine. Now I wanted to test the installer with the same recording procedure (Record New Test). Thus I simply recorded the sequence to install but when running the test, TestComplete doesn't recognize the first button and stops with the error:



An error occurred while calling the "ClickButton" method or property of the "btnWeiter" object.

The object or one of its parent objects does not exist.


Tested Object













Alias: Aliases.MSIEXEC.wndMsiDialogCloseClass.btnWeiter
Mapping item: NameMapping.Sys.MSIEXEC.wndMsiDialogCloseClass.btnWeiter

Missing Object













Alias: Aliases.MSIEXEC.wndMsiDialogCloseClass
Mapping item: NameMapping.Sys.MSIEXEC.wndMsiDialogCloseClass





Any Idea what’s wrong?


6 Replies

  • aqAnt's avatar
    aqAnt
    SmartBear Alumni (Retired)

    Hello Konrad,


    The situation was discussed in this thread. Go through it.

  • Inok's avatar
    Inok
    Occasional Contributor
    Hello Jay,



    In the thread you mention they discuss a solution using a script. I just have a recorded Test and want to run this test. I am in the evaluation process of TestComplete and haven't used scripts till now. Is the only way for testing a msi installer using a script? I assume this is a common problem.

    I tried to create a script Context Menu -> Creating Script and get this (Just one click)


    Sub Install()



     



    'Runs the "setup" tested application.

    Call TestedApps.setup.Run

    'Clicks the 'btnWeiter' button.

    Call Aliases.MSIEXEC.wndMsiDialogCloseClass.btnWeiter.ClickButton

    End Sub



    According the thead I should change the property MSIEXEC to MSIEXEC* 



    Thanks for any help.

     



  • aqAnt's avatar
    aqAnt
    SmartBear Alumni (Retired)

    Hello Konrad,


    You need to modify the Aliases.MSIEXEC object's mapping criteria, so that TestComplete can work with the msiexec process that has the dialog window among other msiexec processes. Please go through the Modifying Mapping Criteria article for more information.

  • Inok's avatar
    Inok
    Occasional Contributor
    I spent several hours but didn't found a way that works. Because I am in the evaluation process of TestComplete I changed my concept and use a silent installation instead. During searching this issue I have found several threads with the same problem. I would recommend to provide an example / code snipped or video for this issue. I am sure if we decide for TestComplete this issue will overtake me...
  • aqAnt's avatar
    aqAnt
    SmartBear Alumni (Retired)

    Hello Konrad,


    Could you zip your project suite and send us the archive via our Contact Support form? We will see what is wrong with its name mapping.

  • Inok's avatar
    Inok
    Occasional Contributor
    Hello Jay,



    I solved the prolem thanks to your mail. A simple delay was the solution. I was so focussed to the Alias that I didn't saw the simple solution.



    Thanks!