2022-03-08 11:21:22 WARN Selenium [DEPRECATION] [:driver_path] Selenium::WebDriver::Chrome#driver_path= is deprecated. Use Selenium::WebDriver::Chrome::Service#driver_path= instead.
An error occurred while loading spec_helper. Failure/Error: browser = Capybara.current_session.driver.browser
Selenium::WebDriver::Error::SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 99 Current browser version is 98.0.4758.102 with binary path /usr/bin/google-chrome
The error message explains exactly what your issue is - You're using chromedriver v99.x with Chrome v98.x -- that won't work. Rather than trying to manually manage the version of chromedriver being used, just use the webdrivers
gem to automatically manage it for you.