How to retrieved "55337" value from innertext using xpath, currently read the innertext as
"Burnsville, MN 55337 United States of America "
//div[#'flashRoot_1']/table/tbody/tr/td[1]/table[1]//table//tr[1]/td[@innertext~'[0-9]']
Thank you in advance
InnertTextValue using Xpath
Re: InnertTextValue using Xpath
Hi,
You mean you want to retrieve the ZIP code and use it in variable? If you know the number is always 5 digits long, use this reg exp...
In recording module, it could look like this...
You mean you want to retrieve the ZIP code and use it in variable? If you know the number is always 5 digits long, use this reg exp...
Code: Select all
\d{5}
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: InnertTextValue using Xpath
Thank you odklizec, same result using "//table//tr[1]/td[@innertext~'\\d{5}']", Not getting the zipcode
Tipu
Re: InnertTextValue using Xpath
Not getting where? What exactly you trying to achieve? Could you please share an example project?
I tried the example I gave you and the variable was correctly filled with 5 digits (extracted from your example string).
I tried the example I gave you and the variable was correctly filled with 5 digits (extracted from your example string).
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