Forum Discussion

Oferv's avatar
Oferv
Super Contributor
14 years ago

wndMsiDialogCloseClass sometime recognize and sometimes not

Hi,

i running an installation test.

sometimes when the installshield is running the object wndMsiDialogCloseClass is recognized and the script is running and sometimes it's not.

what is going on here?TC is not stable with object recognition!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

pls let me know what is going on here because i'm despair already

Thanks
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    It may not be that it's not recognizing the object.  What it may be is that the scripts are running through faster than the actual installation process.



    The general suggestion I always make is, after you record a test, go back and re-edit it and put in WaitWindow or WaitProcess or WaitAliasChild or whatever commands as appropriately, especially in cases where you click a button or link and then expect a different window to come up.



    Considering the class of window you're asking about, this appears to be a window indicating to close the installation process.  Most likely, if it's like most installation wizards, there was a process of copying and moving files around that takes some time before the close window is displayed.  That process may take more or less time depending upon any number of factors so a hardcoded Delay call may not always wait long enough. 



    If you're already using one of the wait commands indicated above, try increasing the timeout setting within the command to something that is definitely longer than the average time for installation.  
  • Oferv's avatar
    Oferv
    Super Contributor
    O.k i figured out what is going on here.

    i'm running the install file then the object is getting index 1 and then when i run the uninstall the object probably getting some other index.how can i make it work?

    Thanks
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Are you using NameMapping/Aliasing?  If so, you can enable Conditional Mode on that object and have it assign the object using conditions like Index 1 or 2 or other things like that.
  • Oferv's avatar
    Oferv
    Super Contributor
    Yes i'm using Aliases but when the installation start the wndMsiDialogCloseClass (in the Aliases it's BaseWindow) object is index 1 and then when i finish the installation i refresh this object Aliases["MSIEXEC"]["RefreshMappingInfo"]() in order for it to get the same index (1) and it doesn't.

    is it o.k to use hard coded indexes? is it not to risky?



    Thanks
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    So long as the indexes are guaranteed not to change, you can use hardcoded indices.  However, in this case, I'd suggest in your name mapping to either use properties other than the index in the mapping OR, as mentioned above, use Conditional Mode in mapping the specific object.
  • Oferv's avatar
    Oferv
    Super Contributor
    Man this awesome i didn't know this possible exist.

    thanks for the advice finally i can run my test in loop for the whole night 

    thanks for the help :-))))))))))))))))