2

Running tests within Docker using capybara and headless chrome. I can see a bunch of defunct processes which is from the chromedriver trying to start chrome.

sh-4.2# google-chrome --version
Google Chrome 79.0.3945.117
sh-4.2# chromedriver --version
ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945@{#614})

Capybara driver config:

  Capybara.register_driver(:headless_chrome) do |app|
    capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
      chromeOptions: { args: %w[no-sandbox headless disable-gpu disable-dev-shm-usage window-size=1920,1080] }
    )

    Capybara::Selenium::Driver.new(
      app,
      browser: :chrome,
      desired_capabilities: capabilities
    )
  end
  Capybara.default_driver = :selenium
  Capybara.javascript_driver = :headless_chrome

Gem versions installed:

  • gem 'selenium-webdriver', '3.6.0'
  • gem 'capybara', '2.6.2'

Within the container I can run commands against google-chrome using the arguments in the capybara config and I get results which leads me to believe it's something with the driver in capybara, but I'm at a loss debugging this app that I didn't write. Any ideas would be greatly appreciated. Thanks!

  • You’re using obsolete versions of Capybara and selenium-webdriver with a current version of Chrome - time to update Capybara and selenium-webdriver (or downgrade chrome and chromedriver to the same timeframe as the other gems) – Thomas Walpole Jan 08 '20 at 05:25
  • what version of chrome / chrome driver would you suggest? i don’t think i can upgrade the gems without other dependencies and it’s not my app. – Chris McFee Jan 08 '20 at 11:12

0 Answers0