Home  >  Q&A  >  body text

python - selenium webdriver 中 Chrome 的"地址问题"

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中文网2741 days ago597

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-04-18 10:29:49

    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

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 10:29:49

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

    reply
    0
  • Cancelreply