watir

Why is the watir gem failing with webdriver error?


After updating chrome, some test code built on the Watir gem fails to run with:

Webdrivers::VersionError: Unable to find latest point release version for 115.0.5790. You appear to be using a non-production version of Chrome. Please set `Webdrivers::Chromedriver.required_version = <desired driver version>` to a known chromedriver version: https://chromedriver.storage.googleapis.com/index.html

Webdrivers::VersionError: Unable to find latest point release version for 115.0.5790. You appear to be using a non-production version of Chrome. Please set Webdrivers::Chromedriver.required_version = <desired driver version> to a known chromedriver version: https://chromedriver.storage.googleapis.com/index.html

This is a bit strange as the version of chrome on my machine is Version 114.0.5735.198 (Official Build) (x86_64)


Solution

  • For my purposes, it was enough to just pin my script to the latest Chrome version available from https://chromedriver.storage.googleapis.com/LATEST_RELEASE

        Webdrivers::Chromedriver.required_version = `curl https://chromedriver.storage.googleapis.com/LATEST_RELEASE`