Multiple Attributes
I have more than one object of the same name. How do I commit an action on anything but the first one?
Lets imagine we have two 'Employees' links. This will click the first link that is found on the page:
$ie.link(:text, 'Employees').click
Use this syntax for the second (or more)
$ie.link(:text => 'Employees', :index => 2).click
Comments (1)
Dec 15, 2011
Eric Dashen says:
The index count starts at 0, therefore the index number should be one less than ...The index count starts at 0, therefore the index number should be one less than the number of the object you are looking for.
Use this syntax for the second (or more)$ie.link(:text => 'Employees', :index => 1).click