简体   繁体   English

Rails 5系统测试不会停留在后台! (水豚与硒和铬)

[英]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: 宝石:

  • rails 5.2.0 导轨5.2.0
  • capybara 3.0.3 水豚3.0.3
  • selenium-webdriver 3.12.0 selenium-webdriver 3.12.0
  • chromedriver-helper 1.2.0 chromedriver-helper 1.2.0

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.

相关问题 黄瓜/水豚不会在Rails 2.3应用程序上以硒模式运行 - Cucumber/Capybara won't run in selenium mode on rails 2.3 app 使用Capybara,Selenium和Rspec测试UJS Rails - Tests UJS Rails with Capybara, Selenium and Rspec 如何在 Mac 上的 Dockerised Rails 环境中使用 Selenium 和 Chrome 运行水豚测试 - How to run Capybara tests using Selenium & Chrome in a Dockerised Rails environment on a Mac 使用Selenium和无头Chrome进行Rails系统测试的Gitlab CI配置 - Gitlab CI Config for Rails System Tests with Selenium and Headless Chrome Rails-水豚不会处理ERB - Rails - Capybara won't process ERB Rails 3 cookies 不会永久存在 - Rails 3 cookies won't stay permanent Rails应用:@javascript Selenium Cucumber / Capybara测试失败,对象未定义 - Rails app: @javascript Selenium Cucumber/Capybara tests fail with object Undefined SSL 下 Capybara、Puma、Rails 系统测试的 EOFError - EOFError with Capybara, Puma, Rails System Tests under SSL 带有硒/独立铬的dockerized Rails 5应用中RSpec系统测试的SSL错误 - SSL Error on RSpec system tests in dockerized Rails 5 app with selenium/standalone-chrome 在Docker中使用水豚和无头硒浏览器进行Rails系统测试 - Rails system test with capybara and headless selenium browser in Docker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM