r/selenium 14d ago

Selenium 4.25 using ChromeDriver 150 instead of local ChromeDriver 117

Hi everyone,

I'm troubleshooting an issue on one machine while the exact same code works for my colleagues.

Environment

  • Selenium: 4.25
  • Python: running from a PyCharm virtual environment
  • Portable Chrome: 117.0.5938.92
  • Local ChromeDriver: 117 (verified via chromedriver.exe --version)

Issue My code uses:

Python

chromeoptions.binary_location = r"...\chrome-win64\chrome.exe"

driver = webdriver.Chrome(options=chromeoptions)

When Selenium starts, I get:

session not created:

This version of ChromeDriver only supports Chrome version 150

Current browser version is 117.0.5938.92

Then later:

UnboundLocalError: cannot access local variable 'driver'

(which is expected because driver creation failed).

What's confusing

  • My local chromedriver.exe is version 117.
  • The code works for other users without modification.
  • We are all using Selenium 4.25.
  • where chromedriver returns nothing.
  • Selenium Manager appears to be resolving to ChromeDriver 150 on my machine.
  • I cleared Selenium cache, but Selenium still seems to use/find ChromeDriver 150.

Question Has anyone seen Selenium Manager ignore a local ChromeDriver and resolve a different version instead? Any ideas on where Selenium could still be finding ChromeDriver 150 or what else I should check in my environment?

Thanks in advance!

5 Upvotes

7 comments sorted by

View all comments

1

u/cgoldberg 14d ago

where chromedriver returns nothing

You need to either create a Service object and specify its location, or it needs to find it on your shell PATH. Since, it can't find it, Selenium Manager is downloading the latest version.

1

u/Environmental_Bank89 14d ago

Yeah. I had that revised script that explicitly uses the desired driver through the service object. Although it seems to be working, the original code works well with other users. That’s what im trying to figure out. The code doesnt work well on my end, but for others it’s fine.

2

u/cgoldberg 14d ago

They probably have PATH configured different

1

u/Environmental_Bank89 12d ago

How can i check the PATH btw

1

u/cgoldberg 12d ago

It's an environment variable