Watir: Select Element Using Multiple Attributes
by Željko Filipin
There are two links in a page that I am testing.
I need to get value of href attribute for the second link.
I can not use
:text, because it will return
href attribute for the first link.
I can use
:index, but if anything on that page changes, it could break.
Bret Pettichord posted posted a solution for this at wtr-general a few months ago.
In 1.5, this syntax works: This will find the second
And it really works.tags: code - ruby