-1

I get issues with execution with this code:

from selenium import webdriver
import time
browser = webdriver.Chrome(r'C:\Users\XXXXX\chromedriver.exe') #Path directory
browser.get('https://www.google.com')

The problem is with PATH folder:

SessionNotCreatedException: Message: session not created: This version of 
ChromeDriver only supports Chrome version 101
Current browser version is 100.0.4896.60 with binary path C:\Program 
Files\Google\Chrome\Application\chrome.exe

Any suggestions?

jfcb
  • 9
  • 4
  • 1
    I suggest you start reading error messages. It's telling you exactly what the problem is. Chrome Driver and and Chrome versions have to match. See [https://chromedriver.chromium.org/downloads/version-selection](https://chromedriver.chromium.org/downloads/version-selection) – Mushroomator Apr 02 '22 at 15:06
  • Now I have a new issue, Message: 'C:\Program Files\Google\Chrome\Application\chromedriver.exe' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home ----- Any suggestion? – jfcb Apr 04 '22 at 12:53

1 Answers1

0

1st issue:

Error

ChromeDriver only supports Chrome version 101

Solution

ChromeDriver and Chrome version have to match. Have a look at the docs. So make sure you have matching versions installed.

2nd issue

Error

'C:\Program Files\Google\Chrome\Application\chromedriver.exe' executable needs to be in PATH

Solution

You need to set PATH variable to include C:\Program Files\Google\Chrome\Application\chromedriver.exe in your operating system i. e. Windows. The PATH variables defines the paths that your operating system searches for executables. See this thread to see how to set the environment variable in Windows 10. But you can just google for set PATH variable on and you will find plenty of tutorials.

Mushroomator
  • 6,516
  • 1
  • 10
  • 27