Forum Discussion

vgummala's avatar
vgummala
Occasional Contributor
14 years ago

Capturing the button labels wihtout Hotkeys symbols (&)

We are facing issue with hotkey getting applied to string captions in dealing with multi language support.


Scenario:


When user spy buttons or menus which are having hotkeys applied string caption (Like New View...” button displayed as Ne&w View...” because of hotkey applied to ‘W’ character)



Now in the script we need to use TestObject.Window("Button"," Ne&w View...",1).ClickButton().  And it creates problem in dealing with multi language support because captions  from each languages without ‘&’ symbols. 



Example:


 ENGLISH = New View...

 FINNISH = Uusi näkymä...

 FRENCH = NouvelleVue...

 GERMAN=Neue Ansicht..


Above strings are displayed as below, when user Spy the buttons.


 ENGLISH = Ne&w View...

 FINNISH = Uusi n&äkymä...

 FRENCH = No&uvelle Vue...

 GERMAN=Neue An&sicht..



So we need a help on solving the above issues, would it be possible to refer an object without hotkeys during the execution.


Is there any option in test complete to avoid the hotkeys during the execution as well as in spy?

1 Reply

  • Hello Vijai,


    Unfortunately, TestComplete does not have an option that would allow skipping the hotkey symbol in object names. Sorry for the inconvenience.



    Still, you can improve TestComplete object recognition for your application under test if you use the Name Mapping feature. Please note that you can create individual name mapping configurations for each language supported by your application.



    For more information on Name Mapping, please see the following topics:

    Name Mapping - Overview

    About Name Mapping Configurations



    Object recognition in multilanguage applications is also discussed in the Namemapping for Multilingual testing forum thread.


    Please let us know whether this information helps.



    Thank you.