我正在使用capybara-webkit和capybara和ruby进行这些测试。我有一个包含3个场景的功能文件。在第二个场景之后它刚刚挂起并向我显示错误
Request timed out after -1 second(s) (Capybara::Webkit::TimeoutError)
/home/waqaslatif/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/capybara-webkit-1.11.1/lib/capybara/webkit/browser.rb:305:in `check'
/home/waqaslatif/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/capybara-webkit-1.11.1/lib/capybara/webkit/browser.rb:211:in `command'
/home/waqaslatif/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/capybara-webkit-1.11.1/lib/capybara/webkit/browser.rb:39:in `reset!'
/home/waqaslatif/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/capybara-webkit-1.11.1/lib/capybara/webkit/driver.rb:264:in `reset!'
/home/waqaslatif/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/capybara-2.7.1/lib/capybara/session.rb:109:in `reset!'
/home/waqaslatif/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/capybara-2.7.1/lib/capybara.rb:331:in `block in reset_sessions!'
/home/waqaslatif/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/capybara-2.7.1/lib/capybara.rb:331:in `reverse_each'
/home/waqaslatif/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/capybara-2.7.1/lib/capybara.rb:331:in `reset_sessions!'
/home/waqaslatif/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/capybara-2.7.1/lib/capybara/cucumber.rb:9:in `After'
如果我分别运行所有三个场景,那么所有场景都在传递。如何通过避免上述错误让它们一起运行。
答案 0 :(得分:0)
通过在配置中添加config.skip_image_loading
,我就能解决问题。