How to click <a> tag in selenium
selenium, selenium-ide, selenium-rc, selenium-webdriver
Solution
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();
Problem
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>