Environment: Eclipse - Java - Junit - firefox webdriver
Screen shot url : https://www.dropbox.com/s/26fl2l1y1mkpxiz/Screenshot%202014-01-06%2001.52.43.png
I am trying to test a webpage but unable to find element (looks like a button).
Firebug xpath is :.//*[@id='DERIVED_REGFRM1_LINK_ADD_ENRL$118$']
With the same Xpath, it works correctly with selenium IDE (By recording).
It's html code is:
<td valign="top" align="left">
<div id="win0divDERIVED_REGFRM1_LINK_ADD_ENRL$118$">
<span class="SSSBUTTON_CONFIRMLINK" title="Enroll in Classes">
<a id="DERIVED_REGFRM1_LINK_ADD_ENRL$118$" class="SSSBUTTON_CONFIRMLINK"
href="javascript:submitAction_win0(document.win0,
'DERIVED_REGFRM1_LINK_ADD_ENRL$118$');"
tabindex="192" ptlinktgt="pt_peoplecode"
name="DERIVED_REGFRM1_LINK_ADD_ENRL$118$">Proceed to Step 2 of 3</a>
</span>
</div>
</td>
I have tried my finding By.xpath, id, etc.
eg: driver.findElement(By.xpath("//*[@id='DERIVED_REGFRM1_LINK_ADD_ENRL$118$'] ")).click();
What is the correct solution?