Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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().

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011284]
[Corion]: Yay, vacation time now - one week off work (but a Perl workshop in the middle ;)) )
[talexb]: TStanley I just realized that I was in your area for a convention back in April. We were at the high school for the weekend, the one with the long driveway. Nice spot.
[TStanley]: I am heading to Arlington, Virginia next week, then I get to spend an entire week at home. Looking forward to that as I will have spent 7 weeks on the road by the end of next week
[talexb]: That's a long road trip. I haven't travelled for business in years.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2017-06-23 14:23 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (548 votes). Check out past polls.