Localization issues

Ranorex Spy, Recorder, and Studio.
Luis Leon
Posts: 10
Joined: Tue Aug 10, 2010 12:18 am

Localization issues

Post by Luis Leon » Tue Aug 10, 2010 12:38 am

Hi,

I've been trying ranorex 2.3 for some automation tasks, so far it seems that every form is located using its caption which is a major issue for me since the application I'm testing is localized to 12 languages thus Xpaths are not the same.

For some reason, I noticed that there are some windows using the [@controlname=''] tag on the xpath which are not vulnerable to this situation.

Basically I need to obtain this attribute from every form of my application but I can't see a way. The spy is not displaying this attribute.

How do I obtain the controlname attribute for a form??

Thanks in advance and Regards,

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Localization issues

Post by Ciege » Tue Aug 10, 2010 4:00 pm

If Spy is not showing the object with a controlname set, it may not be set by the developers. Ask them to take a look in code to make sure all objects are uniquely named so that automation will not be affected by localized scenarios.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

Luis Leon
Posts: 10
Joined: Tue Aug 10, 2010 12:18 am

Re: Localization issues

Post by Luis Leon » Tue Aug 10, 2010 6:10 pm

After taking a look at the code, I realized all the windows affected by this issue are Messagebox.Show instances with custom messages and button sets.

Is there a way to indentify the messagebox.show instances regardless of their caption?

Regards

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Localization issues

Post by Ciege » Tue Aug 10, 2010 6:19 pm

Look through the properties given by RanorexSpy.
Maybe you can use the Class property since message boxes should have a unique class as compared to your AUT (I think its 32770 or something).
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

Luis Leon
Posts: 10
Joined: Tue Aug 10, 2010 12:18 am

Re: Localization issues

Post by Luis Leon » Tue Aug 10, 2010 8:25 pm

It seems that the MessageBox.Show appearances can be catched using /form[@class='32770'] and their buttons also have static ControlId values regarldless of the button configuration.

I found these button/controlid relationships:
yes = '6'
No = '7'
Cancel = '2'

This thread provided a solution, You have been of great help, Thanks

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Localization issues

Post by Ciege » Tue Aug 10, 2010 10:16 pm

Excellent. Glad you got it figured out. and thanks for posting the reply as to how you implemented it all so others may be able to use this info if needed.
Good luck on the rest of your automation!
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...