How to fix object properties in xPath
Posted: Wed Oct 22, 2014 4:21 pm
Hi, I am new to Ranorex and xPath.
I am having problems identifying objects which I recorded earlier. There has been a slight change in path to get to that page though.
I think there should be a way to fix objects in xPath without having to re-record them all.
Here is my Original xPath:
/dom[@domain='abc.com']//li[#'S32M68_3_1']/?/?/a[@innertext='Advanced Search']
Here is the New xPath:
/dom[@domain='abc.com']//li[#'S32M384_3_1']/?/?/a[@innertext='Advanced Search']
I noticed the only difference is in 2 digits number and 3 digits number (68 got changed to 384).
How can I fix this in xPath? Is it possible to fix all the objects at once (Globally) ?
If I assign variable how can I just dynamically change middle characters of the string?
Thanks for your help.
I am having problems identifying objects which I recorded earlier. There has been a slight change in path to get to that page though.
I think there should be a way to fix objects in xPath without having to re-record them all.
Here is my Original xPath:
/dom[@domain='abc.com']//li[#'S32M68_3_1']/?/?/a[@innertext='Advanced Search']
Here is the New xPath:
/dom[@domain='abc.com']//li[#'S32M384_3_1']/?/?/a[@innertext='Advanced Search']
I noticed the only difference is in 2 digits number and 3 digits number (68 got changed to 384).
How can I fix this in xPath? Is it possible to fix all the objects at once (Globally) ?
If I assign variable how can I just dynamically change middle characters of the string?
Thanks for your help.