Watir Has A New Method: after?
Imagine that you have two links. Both links are the same.
<a>text</a>
The only thing that makes them different is that the second one is located after an image.
<a>text</a> <img src="image.png" /> <a>text</a>
Of course, you just have to click the second link. You have already tried this.
browser.link(:text, "text").click
But, it always clicks the first link. There is a way.
browser.link(:after?, browser.image(:src, /image/)).click
This is so cool.
(You will need Watir 1.5. Bret Pettichord posted that at wtr-general.)

Zjelko,
Yes, when I saw that, I too was amazed. Very cool.
Jason
29 May 07 at 6:34 am
Yes, I am waiting for a long time for this one. Good Job. Please keep touch with me. I am always available in this mail id raveendran@railsfactory.org
Raveendran
29 May 07 at 11:33 am