I'm trying to automate a process using selenium. When I run the code it gives me the error bellow.
WebDriverException: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.39.562718 (9a2698cba08cf5a471a29d30c8b3e12becabb0e9),platform=Windows NT 10.0.22000 x86_64)
I have downloaded the new driver and passed the variable in system variables under path. Can anyone please help me figure this out. I'm a student just starting my tech career.
This question has been asked many times before in similar disguises and the answers have usually advised to match versions. However, i have often struggled to match versions (for various reasons) and this is rather cumbersome when the versions keep changing.
For this reason, I use the
ChromeDriverManager()which installs the correct version at each time.You need to install webdriver-manager:
And this is the working code
You can find the docs here: https://pypi.org/project/webdriver-manager/
This module recognises and has solved a problem for us all:
I hope it helps.