python - selenium webdriver 中 Chrome 的"地址问题"
PHP中文网
PHP中文网 2017-04-18 10:27:49
0
2
622
from selenium  import webdriver
browser = webdriver.Chrome(executable_path='/sufan/Applications/Google Chrome.app' ) 
print(browser.get("http://www.baidu.com"))

selenium.common.exceptions.WebDriverException: Message: 'Google Chrome.app' executable needs to be in PATH.

为什么是给的报错说是地址不对呢?该怎么写呢?

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
巴扎黑

I haven’t used selenium much, so I may not be able to solve your problem. However, I found a similar question and see if the answer helps.
Stackoverflow

洪涛

executable_path='/Users/sufan/Applications/Google Chrome.app''

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template