0

I have this code:

#!/usr/bin/env python

import selenium
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
import undetected_chromedriver as uc
driver = uc.Chrome(executable_path='/usr/local/bin/chromedriver', options=chrome_options)
# code

When I run the script, I get:

from session not created: This version of ChromeDriver only supports Chrome version 111
Current browser version is 110.0.5481.100
$ /usr/local/bin/chromedriver --version
ChromeDriver 111.0.5563.64 (c710e93d5b63b7095afe8c2c17df34408078439d-refs/branch-heads/5563@{#995})

What's wrong?

Tested also with

from selenium import webdriver
import chromedriver_autoinstaller
chromedriver_autoinstaller.install() 

Same error.

1 Answers1

1

There are two instances of Chrome installed in your machine.

The Chrome instance installed at the default location isn't used by your test framework. Your tests uses another instance of Chrome installation which isn't updated to recent v110.0 levels.

Hence, though chromedriver_autoinstaller downloads and installs the latest ChromeDriver v110.0 but there is mismatch between ChromeDriver version and version. Hence you see the error.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352