Selenium error message: unknown error: cannot find Chrome binary

created at 11-12-2021 views: 2


The reason is that selenium cannot find the browser (note that this is the path of the browser, not the path of the webdriver), so you need to specify the path of the browser. The specific operations are as follows:

rom selenium import webdriver

url = ''
options = webdriver.ChromeOptions()

# key point
options.binary_location = "D:\Google\Chrome\Application\chrome.exe"

driver = webdriver.Chrome(executable_path="D:\chromedriver_win\chromedriver.exe", options=options)
created at:11-12-2021
edited at: 11-12-2021: