Forum Discussion
I am using Keyword scripts and my application is desktop application.Thanks Marsha.
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/).
- Raghukatta10 years agoContributor
Thanks for your replay Alex.
Below are the properties of buttons in different locals.
In German
Sys.Process("Ascend").Window("#32770", "Ascend", 1).Window("Button", "&Ja", 1)
In English
Sys.Process("Ascend").Window("#32770", "Ascend", 1).Window("Button", "&Ok", 1)
I am not moving towards conditional name mapping as there will be more countries added in future and every time I need to update Name mapping.Instead I am using data table to read the translations if required.But for clicking windows buttons using keyword scripts, I am not able to use the data table.