Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Syntactic Confectionery Delight
 
PerlMonks  

Re: How to click on 2nd link (both have same Xpath)

by Corion (Pope)
on Jan 02, 2013 at 14:54 UTC ( #1011284=note: print w/ replies, xml ) Need Help??


in reply to How to click on 2nd link (both have same Xpath)

You can have indices in XPath expressions. I suggest you use them. See the "predicates" in the XPath specification.

As an alternative, you can do the same in Perl, by first finding all relevant links, storing them in an array and then passing the second entry in the array as an argument to ->click().


Comment on Re: How to click on 2nd link (both have same Xpath)
Download Code
Re^2: How to click on 2nd link (both have same Xpath)
by Anonymous Monk on Jan 02, 2013 at 15:05 UTC
    Thx Corion... :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011284]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-04-18 08:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (464 votes), past polls