My guess would be to change

irb(main):007:0> ie.frame("main").frame(:name,
"context_bar").image(:src, icon_open.gif/).fire_event("onmouseover")

to

irb(main):007:0> ie.frame("main").frame(:name,
"context_bar").image(:src, /icon_open.gif/).fire_event("onmouseover")

Shao




On 6/29/05, Tuyet Cong-Ton-Nu <[EMAIL PROTECTED]> wrote:
> 
> 
> I am looking at your unittests example jscript_test.rb and can't figure out
> what check_dialog refers to?:
> 
>  
> 
> check_dialog('jscriptExtraAlert', /Alert OK/){
> $ie.button(:id, 'btnAlert').click }
> 
>  
> 
> In my application, I am trying to figure out how to click on the image
> "/image/icon_open.gif" (see bolded text below) that will launch a dialog. 
> I've tried many things from the WATIR User Guide but no luck:
> 
>  
> 
> irb(main):003:0> ie.frame("main").frame(:name, "context_bar").getHTML
> 
> => "\r\n<BODY class=contextBarBody onload=javascript:onLoad()
> onunload=javascrip
> 
> t:closeContextBarPopups();cOnUnload();><FORM
> name=headerform onsubmit=\"return f
> 
> alse;\">\r\n<TABLE cellSpacing=0 cellPadding=0 width=\"100%\"
> border=0>\r\n<TBOD
> 
> Y>\r\n<TR>\r\n<TD vAlign=center>\r\n<TABLE height=24 cellSpacing=0
> cellPadding=0
> 
>  width=\"100%\" border=0>\r\n<TBODY>\r\n<TR>\r\n<TD
> width=40><NOBR>&nbsp;<IMG on
> 
> mouseover=\"window.status=' ';return true;\" alt=\"You do not have a
> portfolio o
> 
> pen to save\" src=\"/images/icon_save_gray.gif\" border=0>
> &nbsp;<A onclick=java
> 
> script:onClickOpen(); href=\"#\"><IMG onmouseover=\"window.status='Select
> Portfo
> 
> lio';return true;\" alt=\"Select Portfolio\" src=\"/images/icon_open.gif\"
> borde
> 
> r=0></A> &nbsp;<IMG onmouseover=\"window.status=' ';return true;\" alt=\"You
> do
> 
> not have a portfolio open to save\"
> src=\"/images/icon_save_as_off.gif\" border=
> 
>  
> 
>  
> 
> This should work, but I got compiled error.
> 
> irb(main):007:0> ie.frame("main").frame(:name, "context_bar").image(:src,
> icon_open.gif/).fire_event("onmouseover")
> 
> SyntaxError: compile error
> 
> (irb):7: syntax error
> 
> ie.frame("main").frame(:name, "context_bar").image(:src,
> icon_open.gif/).fire_event("onmouseover")
> 
>                                                            
>                                           
>  ^
> 
>         from (irb):7
> _______________________________________________
> Wtr-general mailing list
> [EMAIL PROTECTED]
> http://rubyforge.org/mailman/listinfo/wtr-general
> 
> 
>

_______________________________________________
Wtr-general mailing list
[EMAIL PROTECTED]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to