I also want to download a file.

I combined Mark's code and code from
http://en.wikipedia.org/wiki/Watir(Handling pop-ups)

require "watir"
require 'watir\contrib\enabled_popup'

ie = Watir::IE.start("http://zeljkofilipin.com/file/";)
ie.link(:index, 1).click_no_wait

hwnd = ie.enabled_popup(5)
if hwnd
 w = WinClicker.new
 w.clickWindowsButton_hwnd(hwnd, "Cancel")
end

It does not work. I get "Exception: Timed out after 5.016 seconds."

I got it to click Cancel with this code on application that I test, but only
that button, I would not click Save or Open. I tried adding "&" (without
qoutes) in front of button name ("&Cancel", "&Save"...) but it clicked only
when I used Cancel.

What am I doing wrong?
--
Zeljko Filipin
zeljkofilipin.com
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to