Multilanguage ToolStrips

Ask general questions here.
Haggy
Posts: 2
Joined: Mon Apr 06, 2009 12:03 pm
Contact:

Multilanguage ToolStrips

Post by Haggy » Mon Apr 06, 2009 1:31 pm

Hi

whats the best practice for testen ToolStrips, which will be translated @ runtime?

Do you use the AccessibleName ?
I'm not sure if the AccessibleName will get translated somewhen.

Thanks in Advance
Boas

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Mon Apr 06, 2009 2:48 pm

Hi Boas,

I see what you mean. Do you know the possibilities for the AccessibleName value of your specified toolstrip before starting the test? If yes, you're able to extend your RanoreXPath expression with some 'OR' conditions as described within the Ranorex Studio example for the calculator application.

The following RanoreXPath expression works for both, english and german operating systems:

/form[@title='Calculator' or @title='Rechner']

best regards,

Christoph
Ranorex Support Team

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

Post by Ciege » Tue Apr 07, 2009 8:27 pm

Using the OR statement in the RanoreXPath expression appears to be a very powerful solution.

My question is what weight does Ranorex give on each OR statement? Does it check for the 1st item completely then the second? Does it stop on the first positive hit for either statement? What happens if more than one object can be found? I.E. the 1st or item can fit object one while the second OR item can fit object two?

For my last question above, can this be used to check which of two (or more) possible objects exist? I.E. Right now I check for object 1 if that results in a failure I check for object two. Would it be quicker for me to OR the RanoreXPath and check for both items at once?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Wed Apr 08, 2009 1:04 pm

The or statement works similar to the or operator in most programming languages.
1) It is inclusive i.e. one or both must be true
2) It evaluates from left to right. If one condition evaluates to true, the whole or expression is true

So to answer your question if you have one object which fits one and one object which fits two, both match.

If you are looking for similar elements (e.g. same Role with slightly different attributes) it might be useful to search with "or". Otherwise, use separate queries.

Michael
Ranorex Team