Posted 14 days ago. Visible to the public.

Chromedriver: Disabling the w3c option might break your integration tests with Chrome 91

We recently noticed issues with Chrome 75+ when having the w3c option enabled within the Selenium webdriver. It looks like recent Selenium versions don't have any issues with the w3c interface anymore. And starting with Chrome 91 this fix might cause unexpected issues, so you should try to enabled this option again or just remove the following line from you configuration:

options.add_option('w3c', false)

Background: Setting the w3c option to false will enforce a legacy mode in Chrome starting with version 91. This results in a different value of input.value and input.text (nil instead of empty string) and will cause unexpected errors with Selenium. You will see errors in your integration tests like below if you are affected by the issue:

The field's content "" did not match "some-text" (RSpec::Expectations::ExpectationNotMetError)

Issue with headless Chrome

After removing the line above in the configuration it could happen that the tests are no longer running in headless mode. Updating the selenium-webdriver gem to >= 3.13.0 fixed the problem.

Issue with old Capybaras

You may also need to upgrade your Capybara version.

Your development team has a full backlog of feature requests, chores and refactoring coupled with deadlines? We are familiar with that. With our "DevOps as a Service" offering, we support developer teams with infrastructure and operations expertise.

Owner of this card:

Florian Leinsinger
Last edit:
about 11 hours ago
by Henning Koch
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Florian Leinsinger to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more