I am using this to get the number or all the href:
//chrome
$x("(//ul[@class='pagination']//li/a[contains(.,'Seguinte')]/@href)");
The page has this:
<ul class="pagination">
<li><a href="http://www.website.com/fornecedores--2">Seguinte</a></li>
</ul>
I want the text of href "http://www.website.com/fornecedores--2
".
What i am doing wrong?
You may use substring-after()
to get the part of the href
attribute after the --
:
substring-after(//ul[@class='pagination']//li/a[contains(.,'Seguinte')]/@href, '--')