Have tried multiple variations. Even used Testwise 3 recorder to see if it came up with something different. For some reason, I can’t get watir to click on this OK button. It just keeps saying assert_exists : unable to locate element. I’m using Firefox 15.
$browser.button(:value,”OK”).click
Ideas?
<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="4" summary="">
<TR>
<TD><INPUT TYPE="BUTTON" VALUE="OK" onClick="javascript:buttonSubmit('OK')" CLASS="OraButton"></TD>
<TD><INPUT TYPE="BUTTON" VALUE="Cancel" onClick="javascript:buttonSubmit('CANCEL')" CLASS="OraButton"></TD>
</TR>
</TABLE>
It looks like watir-webdriver (or selenium-webdriver) is case-sensitive when looking for the input’s type attribute value.
I was able to get it to work by either fixing the HTML:
Or using an xpath locator: