Forum Discussion

Raghukatta's avatar
Raghukatta
Contributor
8 years ago

Handing windows dialog box in multiple languages

Hi ,

 

I am working on windows application which is in multiple languages. There are few default windows dialog boxes with OK and Cancel buttons.The button properties are changing from language to language as it is OS dependent. Is there any we can directly accept or reject windows dialog boxes like Alert().Accept() in Selenium.

 

Thanks in advance!!! 

8 Replies

    • Raghukatta's avatar
      Raghukatta
      Contributor

      I am using Keyword scripts and my application is desktop application.Thanks Marsha.

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Raghukatta:

         

        Hi,

         

        > my application is desktop application.

        Everything mentioned by Marsha is applicable to web applications.

        For the desktop application you should examine the given dialog window in the Object Browser and try to find objects' identification parameters that are language independent and use them for NameMapping / object identification via FindChild().

        For example, the system dialog window most probably will be of WndClass = '#32320' with the OK and Cancel buttons having IDs of btnOK and btnCancel accordingly (if I remember it correctly). In this cae your test code can reference them as

        Sys.<process>.Window('#32320').Window('btnOK') that is language independent.

        In the worst case when some given object cannot be stably and reliably identified without some language-dependent information, you may consider NameMapping configurations (https://support.smartbear.com/viewarticle/80669/).