Read more

Selenium may break with ChromeDriver 75+

Jakob Scholz
June 06, 2019Software engineer at makandra GmbH

This fix is not recommended anymore since Chrome 91 will raise further issues. It looks like recent Selenium versions don't have any issues with the w3c interface anymore.

When you update your ChromeDriver to version 75 or beyond, you might get w3c errors in your tests.

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

For example, reading the browser console for errors no longer works, and page.driver.browser.manage.logs.get(:browser) will raise an error like "undefined method `log' for #<Selenium::WebDriver::Remote::W3C::Bridge:0x000055903f307aa8>".

Add options.add_option('w3c', false) to your Selenium configuration (e.g. features/support/selenium.rb) and you should be back to normal:

Capybara.register_driver :selenium do |app|
  options = Selenium::WebDriver::Chrome::Options.new(args: %w[--disable-infobars])
  options.add_option('w3c', false)
  Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
end
Posted by Jakob Scholz to makandra dev (2019-06-06 14:47)