0

私は何を間違っていますか。新しく開いたウィンドウが見つからない場合、スクリプトはタイムアウトします。

C:/Ruby/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill': Timeout::Error (Timeout::Error)
        from C:/Ruby/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fill'
        from C:/Ruby/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
        from C:/Ruby/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
        from C:/Ruby/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line'
        from C:/Ruby/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
        from C:/Ruby/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request'
        from C:/Ruby/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
        from C:/Ruby/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
        from C:/Ruby/lib/ruby/1.9.1/net/http.rb:1293:in `request'
        from C:/Ruby/lib/ruby/1.9.1/net/http.rb:1286:in `block in request'
        from C:/Ruby/lib/ruby/1.9.1/net/http.rb:745:in `start'
        from C:/Ruby/lib/ruby/1.9.1/net/http.rb:1284:in `request'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/sele
nium/webdriver/remote/http/default.rb:82:in `response_for'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/sele
nium/webdriver/remote/http/default.rb:38:in `request'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/sele
nium/webdriver/remote/http/common.rb:40:in `call'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/sele
nium/webdriver/remote/bridge.rb:598:in `raw_execute'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/sele
nium/webdriver/remote/bridge.rb:576:in `execute'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/sele
nium/webdriver/remote/bridge.rb:207:in `getWindowHandles'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/sele
nium/webdriver/common/driver.rb:185:in `window_handles'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.1/lib/watir-we
bdriver/window.rb:119:in `locate'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.1/lib/watir-we
bdriver/window.rb:106:in `handle'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.1/lib/watir-we
bdriver/window.rb:99:in `use'
        from tst.rb:38:in `rescue in <main>'
        from tst.rb:31:in `<main>'

--

begin
Timeout::timeout(10) do
   b.frame(:id, "ifContentBody").link(:text, "Filter").click
  puts b.check_for_http_error()
end
  rescue Exception => e
  puts "try get popup"
  b.window(:url, 'https://www.XXXXX.com/XXXX/aspx/InvestmentDetailOptions.aspx?IDAssetType=').use do
 puts b.check_for_http_error()
 b.button(:id, "ctl00_ContentPlaceHolder2_btnSubmit2").click
 end

終わり

お知らせ下さい。私はクロームでwatir-webdriverを使用しています。私はそれがうまくいくように見えるすべてのwatirspecを試しましたが、私はそれを理解できませんでした.

ありがとう

M

4

0 に答える 0