How to get link with text “Next” in the code bellow using CSS or XPath?
<div id="pagination">
<a href="link">2</a>
<a href="link">3</a>
<a href="link">4</a>
<a href="link">5</a>
<a href="link">6</a>
<a href="link">7</a>
<a href="link">8</a>
<a href="link">9</a>
<a href="link">10</a>
<a href="link">Next</a>
<a href="link">Last</a>
</div>
It’s not quite clear what you want. If you want the tenth link:
Or:
If you don’t know which element number it’ll be but are keying off the text and want to use CSS, I’d do:
Unfortunately, CSS can’t search the text of a tag, so you have to get a bit creative. XPath can do it: