[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby ->Watir - Clicking javascript

newyorkdolluk

7/11/2006 3:21:00 PM

hi,

i have a html file with the following javascript:

<td width="60"
id="toplevel_button4" onclick="javascript:window.location='/ATT/listr
eports.do'" onmouseover="javascript:window.status='General Text'"
onmouseout="javascript:window.status=''" title=
"General Text" class="toplevel_nav_button hand_Cursor">
Reports
</td>

can anyone advise on how to get ruby/watir to automatically 'click'
this. I have played with Watir::IE and Watir::Simple methods but cant
seem to spot it.

thanks.

1 Answer

Xavier Noria

7/11/2006 5:06:00 PM

0

On Jul 11, 2006, at 17:25, newyorkdolluk wrote:

> <td width="60"
> id="toplevel_button4" onclick="javascript:window.location='/ATT/listr
> eports.do'" onmouseover="javascript:window.status='General Text'"
> onmouseout="javascript:window.status=''" title=
> "General Text" class="toplevel_nav_button hand_Cursor">
> Reports
> </td>
>
> can anyone advise on how to get ruby/watir to automatically 'click'
> this. I have played with Watir::IE and Watir::Simple methods but cant
> seem to spot it.

That's

ie.cell(:id, 'toplevel_button4').fire_event('onclick')

-- fxn