text I ...">

How to access an item through another item using Watir?

I have an HTML page as follows:

<a>text</a>
<img src="image.png" />
<a>text</a>

I would like to click the second link. Links have completely identical attributes. The only thing that is different is that the second link is after the image.

This always clicks on the first link:

browser.link(:text, "text").click
+3
source share

Source: https://habr.com/ru/post/1718449/


All Articles