我在我的ubuntu系统/ ci上遇到了capybara-webkit + xvfb的问题。 OSX运行良好。capybara-webkit jQuery.active不能与xvfb工作
安装了QT5。
我使用wait_for_ajax法(https://robots.thoughtbot.com/automatically-wait-for-ajax-with-capybara)
Ubuntu的返回:未定义的方法`零”为零:NilClass
我试过无头宝石,我试过xvbf-run - 都在同一个错误中运行。感觉就像它没有使用webkit驱动程序,而是使用普通水豚。
(另外两个明显缺陷的运行,这是我没有OSX上 - 但是我可以重写这些,但jQuery.active我做不到)
在我rails_helper.rb
RSpec.configure do |config|
[...]
require 'capybara/webkit'
require 'headless'
Capybara.javascript_driver = :webkit
end
Capybara::Webkit.configure do |config|
# config.debug = true
# Timeout if requests take longer than 5 seconds
config.timeout = 5
# Don't load images
config.skip_image_loading
end
还我试图
config.around(:each, js: true) do |example|
Headless.ly do
example.run
end
end
所以我的想法如何解决它 - 任何人在同样的问题之前运行,并有任何暗示我吗?