Below is my code
<TD ALIGN="LEFT" width="65%" id="oldcontent" >3. Download csv template
<a href="javascript:doformsubmit('3');"><IMG src="images/date_pick.gif" border=0></a>
</TD>
How do i locate a href element which has javascript function calling and also there is no id present.Thanks in advance for help
Am answering my own question:The below syntax works
assertTrue(selenium.isElementPresent("//a[@href=\"javascript:doformsubmit('3');\"]"));
You can use the appropiate Xpath expression (something like //a[(@href=’javascript:doformsubmit(‘3′);’)]), check this post for more examples.