Reputation: 65
I want to find the the element for the Edit:
my java code is not working.
String xpathLocater = "//a[contains(text(),'onEditFilter('modifier')')]";
return driver.findElement(By.xpath(xpathLocater));
This is the source code for the element.
<tr class="listeven">
<td>
<a onclick="return onEditFilter('modifier');" href="#">Edit</a>
</td>
</tr>
Upvotes: 0
Views: 54
Reputation: 13995
something like
String xpathLocater = "//a[contains(@onclick,\"onEditFilter('modifier')\")]"
Upvotes: 1