Home >Backend Development >Python Tutorial >How to Fix \'WebDriverException: Unknown Error\' with Selenium and Older Chrome Versions?
WebDriverException: Unknown Error with Selenium and Older Chrome Versions Using Python
When attempting to launch Selenium with an older version of Google Chrome, you may encounter the error "WebDriverException: unknown error: cannot find Chrome binary." This issue typically arises when the ChromeDriver cannot locate the Chrome binary in its default location.
The solution to this problem involves explicitly specifying the Chrome binary location using the binary_location property of the webdriver.Chrome.Options class. However, it's crucial to note that this error can also indicate that the downloaded version of Chrome or ChromeDriver does not match the requirements specified in the ChromeDriver documentation.
To ensure compatibility, it's recommended to adhere to the following requirements when using older Chrome versions with Selenium:
By following these guidelines, you should be able to successfully launch Selenium with an older version of Chrome. If issues persist, consult the official ChromeDriver documentation for further troubleshooting steps.
The above is the detailed content of How to Fix \'WebDriverException: Unknown Error\' with Selenium and Older Chrome Versions?. For more information, please follow other related articles on the PHP Chinese website!