WebDriverException: Message: 'geckodriver' executable needs to be in PATH

后端 未结 5 778
梦谈多话
梦谈多话 2021-02-03 11:32

os:windows 7 selenium version 3.0.1 mozilla firefox:48.0.2

Traceback (most recent call last):
  File \"C:\\Users\\LENOVO\\Desktop\\kk2.py\", line 4, in 

        
5条回答
  •  北荒
    北荒 (楼主)
    2021-02-03 12:10

    please check the answer:

    https://stackoverflow.com/a/37765661

    https://stackoverflow.com/a/40208762

    Shortly,

    From selenium 3.0, you have to explicitly download Marionette geckodriver for Firefox (which is similar to ChromeDriver for Chrome) and keep it in a place where the system can identify it. (like System PATH - environmental variables in Windows) or specify using language options.

    References:

    1. Download Marionette GeckoDriver
    2. https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver
    3. https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette

提交回复
热议问题