Željko Filipin's blog.
Home Blog Tags License

View on GitHub
25 May 2007

Watir Has A New Method: after?

by Željko Filipin

Imagine that you have two links. Both links are the same.


The only thing that makes them different is that the second one is located after an image.

<img src="image.png" />

Of course, you just have to click the second link. You have already tried this., "text").click

But, it always clicks the first link. There is a way., browser.image(:src, /image/)).click

This is so cool.

You will need Watir 1.5. Bret Pettichord posted that at wtr-general.

tags: code - ruby