Page 1 of 1

XPATH support

Posted: Tue Jul 17, 2018 8:57 am
by radimag
Hi,

Does Ranorex support translate or matches function in XPATH?
First thought, it seems not. But I prefer to-do a double check.

Documentation of both functions can be found on the official w3 xpath function page. (Can't post urls)

Thanks in advance!

Re: XPATH support

Posted: Wed Jul 18, 2018 9:09 pm
by Support Team
Hi radimag,

While RanoreXPath is based on XPath, it doesn't support all the features and expressions XPath supports at this time (including the translate and matches functions). If are you able to provide more detail to what you are trying to do, I will be happy to look into another method to achieve this.

Cheers,
Ned

Re: XPATH support

Posted: Thu Jul 19, 2018 10:08 am
by radimag
Thanks for the answer.

I'm trying to ignore case-sensitive in a xpath.

Example:
Find div tag with attribute name that contains the value 'example' without case-sensitivity

Code: Select all

<div name="This is an ExAmPle name">test</div>
.//div[@name~'example'] 

Re: XPATH support

Posted: Thu Jul 19, 2018 2:18 pm
by odklizec
Hi,

You can use regular expression, to ignore character case, like this:

Code: Select all

.//div[@name~'(?i:example)']
Hope this helps?

Re: XPATH support

Posted: Tue Jul 24, 2018 12:15 pm
by radimag
Thanks odklizec, this solved the problem.

Re: XPATH support

Posted: Tue Jul 24, 2018 12:32 pm
by odklizec
Hi,

I'm glad to hear that ;)