xml - XPath for anchor in sibling TD -
i tying work out xpath select tag in 2nd sibling td 1 matches "paypal sale". there many such rows on table wanting first match.
here's html
<tr> <td class="ref">paypal sale</td> <td class="icon">...</td> <td class="from"><a class="nav" href="http://google.com">click here</a></td> </tr> ... <tr> <td class="ref">paypal sale</td> <td class="icon">...</td> <td class="from"><a class="nav" href="http://google.com">click here</a></td> </tr>
so far have not working:
//tr[td=\'paypal sale\'][1]/following-sibling::td[2]/a
try this:
//tr/td[. = 'paypal sale']/following-sibling::td[2]/a
Comments
Post a Comment