selenium调用Chrome报错unknown error: cannot find Chrome binary

I. Description of the problem

Given as follows

Message: unknown error: cannot find Chrome binary

Second, the problem is solved

Python and Java common

Solution one:

1, the driver put the Chrome installation directory of Chrome

Here Insert Picture Description

2,

System.setProperty("webdriver.chrome.driver",
				"C:\\Program Files (x86)\\Google\\Chrome Beta\\Application\\chromedriver.exe");

Unknown drive instead of an absolute path browser installed
problem-solving

Solution two:

1, or a method of first step

2, to configure the system variables webdriver

Here Insert Picture Description

3, remember to restart the IDE to load the system variables

Solution three:

Webdriver into the Python installation directory

Here Insert Picture Description

I tried, I did not succeed

After configuring the environment variables, you are then dispensed with the position of the code configuration webdriver

System.setProperty("webdriver.chrome.driver",
				"C:\\Program Files (x86)\\Google\\Chrome Beta\\Application\\chromedriver.exe");
driver = webdriver.Chrome("C:\Program Files (x86)\Google\Chrome Beta\Application\chromedriver.exe");
Published 59 original articles · won praise 6 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_27009225/article/details/103743730