问题描述
当前,在我的Ruby on Rails应用程序中,黄瓜测试正在使用 gem并使用硒进行
Currently in my Ruby on Rails application cucumber test are being run with the capybara gem and using selenium.
最近,在将系统更新到Ubuntu 16.04之后,测试开始失败,并出现 EOFError:文件结尾已达到
错误
Recently after a system update to Ubuntu 16.04 the tests started failing with EOFError: end of file reached
errors
此外,它偶尔还会包含以下错误。
Additionally, it also occasionally includes the following error.
session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData": "frameId":"14314.1","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=54.0.2840.59)
(Driver info: chromedriver=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a),platform=Linux 4.4.0-43-generic x86_64) (Selenium::WebDriver::Error::SessionNotCreatedError)
看起来很相关,但是我实际上并没有使用webkit。
I've looked over at a thread in the capybara-webkit gem that looks related, but I'm not actually using webkit.
任何帮助将不胜感激。
推荐答案
Turns out I'm using a gem called chromedriver-helper that was using rbenv to override the version of chromedriver that was actually being used by capybara and selenium to run the tests. The gem readme said to try running chromedriver-update
in the context of the rails app, which cleared everything up.
这篇关于在最近更新Ubuntu 16.04之后,Capybara硒Xvfb抛出文件结尾错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!