Page 1 of 1

Multilanguage ToolStrips

Posted: Mon Apr 06, 2009 1:31 pm
by Haggy
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

Posted: Mon Apr 06, 2009 2:48 pm
by Support Team
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

Posted: Tue Apr 07, 2009 8:27 pm
by Ciege
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?

Posted: Wed Apr 08, 2009 1:04 pm
by Support Team
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