Menu

Problem with setting nextXPath - biginner

Help
Azadeh
2013-03-12
2013-03-15
  • Azadeh

    Azadeh - 2013-03-12

    I'm beginner and I have problem with nextXPath. The site use this html code for next page there is a div tag after "a" tag.

    a href="?search_placeid=nE22HW2eAJQaf7o-&type=Events&page=2">div class="pagenumber prevnext">Next »div>/a>

    It use the same class "pagenumber prevnext" for next and previous button. I don't know how I can set the nextXPath

     
    • Azadeh

      Azadeh - 2013-03-15

      the answer is:
      (//a[contains(@href,'page=')])[last()]/@href

       
  • Azadeh

    Azadeh - 2013-03-13

    I tried the following nextXPath but it didn't work.
    //a[div[contains(.,'Next') and @class="pagenumber prevnext"]]/@href

     
  • nutcracker

    nutcracker - 2013-03-14

    you can try this:
    //a[starts-with(., 'Next')]/@href

     

Log in to post a comment.