-
Notifications
You must be signed in to change notification settings - Fork 11
Tips and tricks
SchnuckySchuster edited this page Feb 1, 2013
·
3 revisions
XPath Axes: An axis defines a node-set relative to the current node.
Suppose you have a site looking like this (in HTML):
<div id='Row_5_Text'>Element row 5</div>
<div id='Row_5_Icon'> <img src="images/someIcon.png"></div>
Suppose you need to click on the image that belongs to the row that holds the text "Element row 5", this is the xPath locator you need to use:
.//div[text() = "Element row 5"]/following-sibling::div