From: "Jesús Gabriel y Galán" Date: 2010-08-18T21:38:12+09:00 Subject: Re: Click on html element On Wed, Aug 18, 2010 at 1:30 PM, Mario Ruiz wrote: > No ideas? I tested with this html:
Click me !
and this code worked for me: irb(main):006:0> ff = FireWatir::Firefox.start("file:///home/jesus/temp/click_div.html") => # irb(main):008:0> ff.div(:id, "theDiv") => # irb(main):009:0> ff.div(:id, "theDiv").exists? => true irb(main):010:0> ff.div(:id, "theDiv").click This opened the alert in my Firefox window, so the div was clicked. You can look at the FireWatir documentation here to see how you can get a reference to the element you want: http://wtr.rubyforge.org/rdoc/1.6.5/ I think there are methods to get any HTML element, such as table, cell and so on. Jesus.