无法在Mac上的Selenium中使用Geckodriver

时间:2017-01-03 01:36:07

标签: python selenium geckodriver

我试图在Mac上使用Selenium和Python。

from selenium import webdriver  
browser = webdriver.Firefox()

我收到这些错误:

FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver' During handling of the above exception, another exception occurred: selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

我尝试过多种不同的解决方案,包括更改我的$ PATH以添加安装geckodriver的位置(see here),并将geckodriver可执行文件放在usr / local / bin中Pypi.python.org上的documentation我的Selenium版本(3.0.2)。

$ PATH现在包括geckodriver所在的路径,但我仍然会遇到上述错误。有什么想法吗?

我正在运行Python 3.5。

0 个答案:

没有答案