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
Multilanguage ToolStrips
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
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
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
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?
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?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
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
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