If you are getting an error like this while trying to run Selenium using Chrome:
Selenium::WebDriver::Error::SessionNotCreatedError (session not created: This version of ChromeDriver only supports Chrome version X)
It can easily be fixed! Just follow the steps outlined below:
Find out which version of Chrome you are using. Click ‘Chrome’ > ‘About Google Chrome’. This will give tell you your current version of Chrome shown in a Window like this:
In my case, I have Chrome version 85.
Download the proper Chromedriver version. Visit this website: https://chromedriver.chromium.org/downloads and find the correct Chromedriver that corresponds to your Chrome browser version. See this screenshot:
In my case, I will need to download the ChromeDriver version 85.
Once you have downloaded your new ChromeDriver version, place it in /usr/local/bin.
On Mac you can simply do this in Terminal:
open . command will simply open the directory you are currently inside. Now just copy and paste or drag and drop the new ChromeDriver version in that location.
You should now be able to user Selenium and Chrome with no more errors.