You need to invoke following two code snippets in two different
thread/process.
i.e. You spawn new thread/process and invoke the click handler code and
then in
the main thread execute the click code.
===click code===
>
> ie.button(:value, "Download File").click
>
>
====click handler code=====
> autoit = WIN32OLE.new("AutoItX3.Control")
> autoit.WinWait("File Download", "", 5)
> autoit.ControlClick("File Download", "", "Save")
> autoit.WinWait("Save As", "Save &in", 5)
> autoit.ControlSetText("Save As", "Save &in", "Edit1", "path\filename.ext")
> autoit.ControlClick("Save As", "Save &in", "Save")
>
Look at the javascript dialog handling tests in the watir unit-tests
sample & and WindowHelper.rb
in the watir source, to figure out how exactly this code works.
Hope this helps.
Regards,
Manish
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general