how can an accessiblename which contains an apostroph used with RxPath?
attached a snaphot.
The Spy resolves this Element in different ways, this is incomprehensible
Thanks jörg
apostroph in RxPath
-
- Posts: 55
- Joined: Thu Aug 23, 2007 12:00 pm
apostroph in RxPath
You do not have the required permissions to view the files attached to this post.
Re: apostroph in RxPath
Not sure why you got the 2 different XPaths in Spy, but both are correct.
The second one is just using a RegEx that has the "special" characters escaped.
You can tailor the XPath to you liking using and valid RegEx so that it is more readable and reusable for you.
The second one is just using a RegEx that has the "special" characters escaped.
You can tailor the XPath to you liking using and valid RegEx so that it is more readable and reusable for you.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: apostroph in RxPath
Hello,
The second path works since the single quote is escaped with another quote.
You could also use the following path to get your item:
It looks like that you saved a snapshot of your TreeItem and opened it afterwards.
At first, your TreeItem could be identified by its index since there are several TreeItems found.
Then, the TreeItem couldn't be found by its index but by its accessiblename instead.
That is the reason, why the RxPath of your element has changed.
Regards,
Markus (T)
The second path works since the single quote is escaped with another quote.
You could also use the following path to get your item:
Code: Select all
/form[@controlname='ContainerForm']//treeitem[@accessiblename='Device''s Signal Level too high']
At first, your TreeItem could be identified by its index since there are several TreeItems found.
Then, the TreeItem couldn't be found by its index but by its accessiblename instead.
That is the reason, why the RxPath of your element has changed.
Regards,
Markus (T)