Reputation: 2208
Well...I think I still haven't figured out how xpath
works. I am trying to select the below element so that I can click on the second page. But what I am trying does not work. What is wrong here? I am selecting the a
tag and then trying to find the one which contains ref
whose value is next
.
element = driver.findElement(By.xpath("//a[contains(@ref,'next')]"));
Upvotes: 1
Views: 772
Reputation: 16201
I probably see a typo there. The attribute
you are trying to use is rel
which has value next
So the correct xpath
will be
//a[contains(@rel,'next')]
Upvotes: 3