1

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?

Jonas
  • 121,568
  • 97
  • 310
  • 388
M M
  • 27
  • 3

1 Answers1

0

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, '--')
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195