浏览器启动,然后是Net :: ReadTimeout

时间:2017-09-29 21:11:47

标签: webdriver selenium-chromedriver watir

我安装了带有webdrivers和chromedriver的Ruby24 x64。 在irb我输入

require 'watir'
b = Watir::Browser.new

启动Chrome浏览器。在大约30秒后的irb中,我收到一条错误消息:Net :: ReadTimeout

我看过Stackoverflow和互联网的角落。我无法弄清楚造成这种情况的原因。

整个信息:

Net::ReadTimeout: Net::ReadTimeout
        from C:/Ruby24-x64/lib/ruby/2.4.0/net/protocol.rb:176:in `rbuf_fill'
        from C:/Ruby24-x64/lib/ruby/2.4.0/net/protocol.rb:154:in `readuntil'
        from C:/Ruby24-x64/lib/ruby/2.4.0/net/protocol.rb:164:in `readline'
        from C:/Ruby24-x64/lib/ruby/2.4.0/net/http/response.rb:40:in `read_status_line'
        from C:/Ruby24-x64/lib/ruby/2.4.0/net/http/response.rb:29:in `read_new'
        from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:1446:in `block in transport_request'
        from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:1443:in `catch'
        from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:1443:in `transport_request'
        from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:1416:in `request'
        from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:1409:in `block in request'
        from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:877:in `start'
        from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:1407:in `request'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.6.0/lib/selenium/webdriver/
remote/http/default.rb:123:in `response_for'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.6.0/lib/selenium/webdriver/
remote/http/default.rb:78:in `request'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.6.0/lib/selenium/webdriver/
remote/http/common.rb:61:in `call'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.6.0/lib/selenium/webdriver/
remote/bridge.rb:170:in `execute'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.6.0/lib/selenium/webdriver/
remote/bridge.rb:103:in `create_session'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.6.0/lib/selenium/webdriver/
remote/bridge.rb:54:in `handshake'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.6.0/lib/selenium/webdriver/
chrome/driver.rb:58:in `initialize'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.6.0/lib/selenium/webdriver/
common/driver.rb:46:in `new'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.6.0/lib/selenium/webdriver/
common/driver.rb:46:in `for'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.6.0/lib/selenium/webdriver.
rb:86:in `for'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/watir-6.8.4/lib/watir/browser.rb:48:in `initiali
ze'
        from (irb):2:in `new'
        from (irb):2
        from C:/Ruby24-x64/bin/irb.cmd:19:in `<main>'

0 个答案:

没有答案