|
Try this, I was able to get it to work here: def test_ClickEvent $ie.goto("http://www.gruposantander.es/") table = $ie.table(:index, 10) table[9][1].image(:src,
/imagenes\/boton_entrar.gif/).fire_event("onClick") end Also, the .flash method is useful to find were you are on the page when
working with indexes. table = $ie.table(:index, 10).flash Hope this helps, --Mark -----Original Message----- Dear All I am quite new to Ruby and Watir (but have bought and read the famous PickAke). I have had quite a lot of success using Watir on normal HTML pages, however i am having all sorts of trouble with some _javascript_. I was wondering if someone could: 1.- Tell me where to find documentation on using watir with pages that have _javascript_ 2.- Help me with this particular example, i need to click on a button called entrar, that appears as an image in "http://www.gruposantander.es" under "Supernet acceso particulares" From what i gather if i need to click on a button or image or link that starts some _javascript_ i need to do something like: ie.button(...).fire_event("onClick") or ie.image(...)..fire_event("onClick") etc.. However i have not been able to get the onClick that appears on the following HTML table (frow view source of the page) to fire, <td colspan="4" bgcolor="FFFFFF"
align="center" valign="middle"
class="TextoUtilidadesNegro"><a href="" > false;"><img src=""> width="84" height="17" border="0" alt="Transmisión segura de sus datos personales, SSL 128
bits"></a> </td> Any ideas how to do it? I have tried $ie.link(:url, "#").fire_event("onClick") but I get irb(main):029:0> ie.link(:url,"#").fire_event("onClick") Watir::Exception::UnknownObjectException: Unable to locate object, using url and # I've also tried beforeText, afterText,etc.. but can't seem to get it to work Using index i can activate other links, but not this particular one Any help much appreciated ! Thanks Eduardo _______________________________________________ Wtr-general mailing list http://rubyforge.org/mailman/listinfo/wtr-general |
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
