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:
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
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)
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.
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.