If the page is javascript rich, there may be some 
timing/ synchronisation issues as well

try something like:
browser.frame(:id => "frame_id").button(:value => "OK").when_present.click

On Thursday, 20 September 2012 23:55:50 UTC+10, Derek Romeyn wrote:
>
> I've been struggling with this today.   Some watir/ruby scripting still 
> trips me up.    How would I locate and click on this OK button?   
> I've tried using value of OK and I tried finding it using xpath but both 
> just return unable to locate element.  Any guidance here would be 
> appreciated.
>
>
>
> <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>
>
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to