Hello everyone,
Recently with newer versions of Selenium a mechanism we used for clicking on certain links in our webapp has stopped working, and we're not sure whether this is expected to work, or if we need to do something else. Let me try to explain: We have links embedded in tables like so:
<table>
<tr id="rowid">
<td><a href="somepage"><span>link text</span></td>
</tr>
</table>
in which the styling is set up so the
span tag fills out the
td (and the
a tag as well). In our tests we'd like to click on these links somehow, and until now we've been able to use
driver.findElement(By.id("rowid")).click();
which has been working without problems (the inner link would be clicked and the we'd be navigated to
somepage). Until now, that is. Newer versions of Selenium and/or browsers fail to click on the link (from the looks of it, the driver
does find table row, but clicking on it does nothing).
MY QUESTION is, in short, is it correct, as observed in FF, that these links are
not clicked (and should we use another mechanism)? Or is it expected to work, and for reason it's stopped working? I've found a number of issues that ask very similar questions, but so far I haven't been able to find a definite answer (which closely enough matches our setup), so I thought I'd post a question here. I tried the
#selenium channel, but haven't had any reply:
I've attached a minimal demonstration class, which should be able to
work (almost) out of the box. In order to run it, correct the paths to
firefox versions, chrome driver and the test HTML file.
Versions overview:
- OS: Ubuntu 12.04 (LTS)
- Firefox: 20, 22 and 23
- Chrome: 28 (I haven't figured out multiple versions of Chrome on the same machine yet)
- Chrome driver: 2.0 and 2.2
- Selenium: 2.33 and 2.34
Any information/help is appreciated - thanks in advance!