Internationalization testing using Ranorex

Ask general questions here.
kris123pra
Posts: 16
Joined: Fri Sep 17, 2010 8:13 am
Location: India

Internationalization testing using Ranorex

Post by kris123pra » Sun Sep 19, 2010 1:44 pm

Hi

I have to test a software app in different languages. It contains lot of infragistics controls. Ranorex does an excellent job of recognizing and i have no problem while testing the app in english. The problem comes when I need to test in different languages as the @accessiblename gets to change.

Eg: I have a button which is a part of tool bar. Both are infragistic controls. The accessible name of the button and the tool bar change with the language.
Every time I change language and use Ranorex spy, there were buttons with different names but same functionality.
I would like to have something where the functionality can be tested irrespective of the language.

My idea was to use ChildIndex attribute but could not figure out how. Can anyone point out how do I proceed?

Thanks
Kris

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Internationalization testing using Ranorex

Post by Support Team » Mon Sep 20, 2010 12:43 pm

Hi,
kris123pra wrote:My idea was to use ChildIndex attribute but could not figure out how. Can anyone point out how do I proceed?
The best way to overcome this issue would be to search for an attribute in your RxPath which is available overall languages. In the future version, Ranorex 3.0, it will be possible to use variables for such cases. Then you can for example, bind a data source where your different words/phrases are nested and use a variable to check the value. So there shouldn't be a problem to automate also "mutlilang" applications with the accessiblename as in your case.

Please also take a look to our screencasts about the RxPath:
http://www.ranorex.com/support/screencasts.html

Would it be also possible to post us a Ranorex Snapshot, maybe we can find a RxPath for you?

Regards,
Peter
Ranorex Team

kris123pra
Posts: 16
Joined: Fri Sep 17, 2010 8:13 am
Location: India

Re: Internationalization testing using Ranorex

Post by kris123pra » Mon Sep 20, 2010 1:49 pm

Hi Peter

Thanks for your response. Even I had the idea of searching the attribute which would not change with language, but I could only find that the childindex is an attribute which is unique. But since it is a read only value and cannot be accessed directly, I was unable to use it.

Here is the Rxpath for one of such Button control in English and French:

Rxpath for a control in English:
/form[@controlname='FormMain']/element[@controlname='_Form1_Toolbars_Dock_Area_Top']/container/toolbar[@accessiblename='Navigate']/button[@accessiblename='Previous']

Rxpath for a control in French:

/form[@controlname='FormMain']/element[@controlname='_Form1_Toolbars_Dock_Area_Top']/container/toolbar[@accessiblename='Navigation']/button[@accessiblename='Précédent']

Rx path for container is
/form[@controlname='FormMain']/element[@controlname='_Form1_Toolbars_Dock_Area_Top']/container[@accessiblename='DockTop']

Childindex for toolbar is 9, Role is Toolbar, and for button Previous is 3 and role is pushbutton.

How do I access the childindex of the tool bar and the button?

- Kris

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Internationalization testing using Ranorex

Post by Support Team » Mon Sep 20, 2010 2:17 pm

Hi,

The ChildIndex is not visible, but you should be able to use the attribute in the RxPath. Just adapt your RxPath and try to use the ChildIndex, for example:
element[@childindex='1']
Regards,
Peter
Ranorex Team

kris123pra
Posts: 16
Joined: Fri Sep 17, 2010 8:13 am
Location: India

Re: Internationalization testing using Ranorex

Post by kris123pra » Wed Sep 22, 2010 8:34 am

Thanks Peter, I will give a try and let you know if I were successful.

Regards
Kris