Search code examples
pythonseleniumgoogle-chromeautomationwebdriver

Python Selenium Chrome not running after OS upgrade


I recently changed my OS to win11 which afterwards i've not been able to run selenium. When running, it displays this as the output "selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at localhost:1111 from chrome not reachable"

I used "chrome.exe --remote-debugging-port=1111" to open chrome using CMD but it displays this "'chrome.exe' is not recognized as an internal or external command, operable program or batch file." instead of asking for admin right and then opening as usual.


Solution

  • I managed to fix Chrome's error. I added the Chrome application path to the environment variable and it worked.

    This C:\Program Files\Google\Chrome\Application\ is fixed the CMD error.

    Not only updating but making sure the Chromedriver is of the same version as your Chrome browser fixes the error and works. 👍