古いバージョンのIEには、ポップアップウィンドウがあります。IE9では、下部にある変な見た目のバーです。誰かがまだうまくいくものを試しましたか?
1478 次
1 に答える
0
今のところ唯一の方法は TAB を送信することです。
たとえば、Watir と RAutomation の場合
ww = Watir::IE.attach(:url, /1.1.1.127/)
#Click on download link
ww.link(:text, /Download_link/).click
#Click on 'Save As' in the 'funny looking bar on the bottom'
wrauto = RAutomation::Window.new(:title => ww.title)
wrauto.send_keys("{TAB}")
wrauto.send_keys("{TAB}")
wrauto.send_keys("{DOWN}")
wrauto.send_keys("{DOWN}")
wrauto.send_keys("{ENTER}")
#popup window to save
w = RAutomation::Window.new(:title => /Save As/)
#Direction that you going to save
w.text_field(:class => "Edit", :index => 0).set path_direction
w.button(:value => "&Save").click
RAutomation::Window.new(:title => /complete/).button(:value => "Close").click
于 2011-12-09T14:49:52.563 に答える