[英]Rails 5 System Tests won't stay in background! (Capybara with Selenium and Chrome)
When I run my massive suite of Capybara "system" tests, the automated Chrome window constantly takes focus! 当我运行大型的Capybara“系统”测试套件时,自动的Chrome窗口不断受到关注! It basically means I can't work while the test is running. 这基本上意味着测试运行时我无法工作。 This is driving me insane. 这让我发疯。 Is there anything I can do? 有什么我可以做的吗? It didn't do this until recently. 直到最近它才这样做。
Gems: 宝石:
You haven't configured your selenium webdriver correctly. 您尚未正确配置Selenium Webdriver。 From my 5.2 app: 在我的5.2应用中:
# spec/rails_helper.rb
require 'capybara/rspec'
Capybara.javascript_driver = :selenium_chrome_headless
除了以无头模式运行(或向Chrome开发人员提出问题并希望他们在以后的Chrome版本中更改行为)之外,您无能为力
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.