Next Page without Next link
Sometimes web sites puts a list of page numbers in a search result instead of a easy clickable Next button.
One technique would be if we can referrer to the active list element and by finding the first sibling after that. An example:
<ul id="ul">
<li class="selected">1<li>
<li><a href>2</a><li>
<li><a href>3</a><li>
<li><a href>4</a><li>
</ul>
<li class="selected">1<li>
<li><a href>2</a><li>
<li><a href>3</a><li>
<li><a href>4</a><li>
</ul>
An xpath expression to get next page element would be:
id(“ul”)/li[class=”selected”]/following-sibling::li[1]/a
