Hi Tolou,
I spent some time trying out different ways to close
javascript popup. This is what I use and it works great.
StartClicker method which is from the popups_test.rb sample
#------------
def startClicker( button , waitTime = 0.5)
w = WinClicker.new
longName = $ie.dir.gsub("/" , "\\" )
shortName = w.getShortFileName(longName)
c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb
#{button }
#{ waitTime} "
puts "Starting #{c}"
w.winsystem(c)
w=nil
end
#-------------
you can either include this def right into your test case
or put it in a seperate rb file and require it and the
beginning of your test. Then just inlude this one line
statement as in
startClicker("OK")
ie.frame("TopToolbar2").link(:id,"a_History").click
just before you launch your popup.
Cheers
Roy
--- Tolou Taherinia <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have an Microsoft internet explorer alert box that
> comes up when clicking on a button in my web application
> and Im unable to click on "ok" in order to close this
> alert message.This is the button that invokes the
> javascript alert.
>
> ie.frame("TopToolbar2").link(:id,"a_History").click
>
> I have tried almost everything...and any help would be
> greately apprecitaed...
>
>
>
>
>
>
>
>
>
> > _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general