selenium - Watir Chrome 驱动程序 "EOFError: end of file reached"错误

标签 selenium debian watir selenium-chromedriver

我在跑:

Chrome 版本 google-chrome-stable/unknown uptodate 27.0.1453.93-r200836

Debian GNU/Linux 6.0.6(压缩)32x

当我尝试运行时:

require 'watir-webdriver'
require 'headless'
headless = Headless.new
headless.start
b = Watir::Browser.new(:chrome)

我得到:
EOFError: end of file reached
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/protocol.rb:141:in `read_nonblock'
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/protocol.rb:141:in `rbuf_fill'
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:2563:in `read_status_line'
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:2552:in `read_new'
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1320:in `block in transport_request'
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1317:in `catch'
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1317:in `transport_request'
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1294:in `request'
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1287:in `block in request'
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:746:in `start'
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1285:in `request'
        from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/http/default.rb:83:in `response_for'
        from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/http/default.rb:39:in `request'
        from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
        from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/bridge.rb:629:in `raw_execute'
        from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/bridge.rb:98:in `create_session'
        from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize'
        from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/chrome/bridge.rb:29:in `initialize'
        from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/common/driver.rb:37:in `new'
        from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/common/driver.rb:37:in `for'
        from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver.rb:67:in `for'
        from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/watir-webdriver-0.6.4/lib/watir-webdriver/browser.rb:46:in `initialize'
        from (irb):7:in `new'
        from (irb):7
        from /usr/local/rvm/rubies/ruby-1.9.3-p429/bin/irb:16:in `<main>'

我真的不知道如何开始对此进行故障排除。我正在搜索谷歌,但到目前为止还没有找到任何对我有用的修复程序。希望有人可以帮助解决这个问题。

最佳答案

所以几个月后我又回到了这个问题。当我在此处下载最新的 chromedriver 时,似乎无论最初导致此问题的原因是什么:

http://chromedriver.storage.googleapis.com/index.html

目前是 2.9 版

关于selenium - Watir Chrome 驱动程序 "EOFError: end of file reached"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16864579/

相关文章:

java - Selenium Chrome 驱动程序的限制 Web 大规模抓取

python - 如何在 selenium for python 中转义 xpath 1.0 中的单引号

erlang - 由于 gserialver.1.gz,rebar 无法生成版本

jquery - 使用 Watir 测试拖放

Ruby Watir Webdriver - 如何识别并单击 div 标签中的元素?

css - 在Chrome控制台中为xpath选择的节点数

selenium - 带 Selenium 的 Genymotion 模拟器

linux - 如何在 Debian 中将 zlib 更新为自定义版本

php - 安装 php7.0-pgsql - 无法找到包 php-pgsql

ruby - iframe 中的 Watir 和文本字段