问题
After my ubuntu updates, my minitest selenium test got an error, saying:
EOFError: EOFError: end of file reached
and it opens many blank google chrome windows as feature test total count.
my Ubuntu 16.04 updates was (yesterday everything works fine until the system made an update):
Commandline: aptdaemon role='role-commit-packages' sender=':1.105'
Upgrade: snap-confine:amd64 (1.0.42-0ubuntu3~16.04.1, 1.0.43-0ubuntu1~16.04.1), google-chrome-stable:amd64 (53.0.2785.143-1, 54.0.2840.59-1), ubuntu-core-launcher:amd64 (1.0.42-0ubuntu3~16.04.1, 1.0.43-0ubuntu1~16.04.1), libtracker-sparql-1.0-0:amd64 (1.6.2-0ubuntu1, 1.6.2-0ubuntu1.1)
in my test_helper.rb, I have:
Capybara.register_driver :selenium_chrome do |app|
Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
Capybara.current_driver = :selenium_chrome
Capybara.javascript_driver = :selenium_chrome
Capybara.default_driver = :selenium_chrome
I tried to uninstall Google Chrome and used Chromium browser and it works fine. I wanna know how to do it with Google Chrome browser.
Do somebody knows how to fix it?
Please help!
回答1:
I'm not sure if this is going to help, but I asked a similar question here and was able to determine that I was using a gem called chromedriver-helper. That readme said to try running chromedriver-update
within the rails app and that cleared everything up.
来源:https://stackoverflow.com/questions/40011762/eoferror-what-happen-to-my-minitest-selenium-test-how-to-fix-it