Hi!
I have a question regarding the use of "wildcards" or regular expressions.
My problem is I have to perform a click action on this element:
.//div[#'logo']/span[2]/?/?/a[@innertext='Techa 2.0.0-rc.1']
Well as the application version changes the name of the element will change to Techa 2.0.0-rc.2 and so on....
How can I solve this problem like this with wildcards Techa 2.0.0-rc.* ?
Using wildcards possible?
Re: Using wildcards possible?
Hi,
Yes, it is possible to use regular expressions in xpath. You just need to use '~' instead of '=' in xpath expression. I would suggest you to start with Ranorex xpath basics, described here:
http://www.ranorex.com/support/user-gui ... xpath.html
Yes, it is possible to use regular expressions in xpath. You just need to use '~' instead of '=' in xpath expression. I would suggest you to start with Ranorex xpath basics, described here:
http://www.ranorex.com/support/user-gui ... xpath.html
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Using wildcards possible?
Hi!
Thank you for your answer. Could you help me with the shown example. How would it have to look like if I would like to check only for "Techa".
Best wishes
Thank you for your answer. Could you help me with the shown example. How would it have to look like if I would like to check only for "Techa".
Best wishes
Re: Using wildcards possible?
I got it, it is quite simple I used ^Tech
Thank you very much!
Thank you very much!
Re: Using wildcards possible?
Hi,
Try this xpath (matches all elements with innertext starting with 'Techa'):
Try this xpath (matches all elements with innertext starting with 'Techa'):
.//div[#'logo']/span[2]/?/?/a[@innertext~'^Techa']
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration