Below is my code.Am pasting my entire tag
<TR id="oldcontent" bgcolor="#D0D0D0">
<TD id="oldcontent">Foot-OM</TD>
<a id="oldcontent" href="ID=22143"><u>Re-Submit</u></a>
<a id="oldcontent" href="ID=22143"><u>View</u></a>
<TR>
Here i need to click the tag with Re-Submit text.The issue is href="ID=22143",id value gets generated dynamically everytime i execute the test case.So i need to click the Re-submit tag using text present in first text,i.e Foot-OM.Can anyone provide me the xpath>
You can click on it like this :
selenium.click("//a/u[contains(text(),'Re-Submit')]");
For Webdriver :
driver.findElement(By.xpath("//a/u[contains(text(),'Re-Submit')]")).click();
In ruby Selenium webdriver
@driver.find_element(:link, "Re-Submit" ).click
using selenium RC perl
$sel->click("link=Re-Submit");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With