I am trying to select a 5th or 6th grand child which do not have any other attributes other than class name. Please check below example DOM.
<div id="abc abc abc">
<a>
<a>
<a>
<a>
<a>
</div>
Can I find last Fifth a using xpath?? Don't want to use something like //div/a/a/a/a/a
The inside a predicate, the
position()fuction works against the locator step axis. That is called proximity position. So this XPath expression:Meaning:
That expression with this wellformed input:
Selects:
Test in here