I'm having an issue with writing a Selenium test using Java and Spring.
I need Selenium to click on a delete button on a page that contains multiple delete buttons (a list of files). Using the Selenium IDE generates the following code
selenium.click("link=Delete");
which is basically useless. I haven't been able to figure out how to target the specific element contained in a table. Here's the source:
<tr onmouseover="mouseOver(this)" onmouseout="mouseOut(this)">
<td class="thumbnail" align="center"><img src="/services/images/nav/resources.gif" /></td>
<td colspan="3" onClick="nav('FileName'); return false">
<a href="javascript:nav('FileName')">Basics</a></td>
<td>
<a class="actionButton" href="javascript:del('FileName')">Delete</a></td>
<td> </td>
</tr>
I need to either a) find a way to return the xpath of the correct delete action or b) send the javascript command itself through the java code. I haven't been able to figure out how to to either, can anyone point me in the right direction?