Xpath to get the 2nd url with the matching text in the href tag
- by Blankman
A html page has paging links, 1 set at the top of the page and another on the bottom of the page.
Using HtmlUnit, I am currently getting the HtmlAnchor on the page using getByAnchorText("1");
There is a problem in some of the links on the top, so I want to reference the bottom links using XPath.
nextPageAnchor = (HtmlAnchor) page.getByXPath("");
How can I reference the 2nd link on the page, with using xpath?
I need to reference the link using the AnchorText, so a link like:
<a href="....">33</a>
The href has random text, and is a javascript function so I have no idea what it will be.
Is this possible with xpath?