I am having trouble writing a Selenium test using Java and Spring.
I need Selenium to click the delete button on a page containing several delete buttons (file list). Using Selenium IDE generates the following code
selenium.click ("link = delete");
which is basically useless. I was not able to figure out how to configure the target element contained in the 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 xpath to the correct delete action, or b) send the javascript command directly through java code. I could not understand how to what, can someone point me in the right direction?
source
share