Page 1 of 1

Localization issues

Posted: Tue Aug 10, 2010 12:38 am
by Luis Leon
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,

Re: Localization issues

Posted: Tue Aug 10, 2010 4:00 pm
by Ciege
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.

Re: Localization issues

Posted: Tue Aug 10, 2010 6:10 pm
by Luis Leon
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

Re: Localization issues

Posted: Tue Aug 10, 2010 6:19 pm
by Ciege
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).

Re: Localization issues

Posted: Tue Aug 10, 2010 8:25 pm
by Luis Leon
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

Re: Localization issues

Posted: Tue Aug 10, 2010 10:16 pm
by Ciege
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!