mac os 安装 geckodriver

链接:

http://remarkablemark.org/blog/2016/11/06/selenium-geckodriver/

在网上搜了很多方法,都是又麻烦又不起作用。

最后还是在这个网站找到简洁方便的方法。

首先通过brew 安装

$ brew install geckodriver

然后设置配置文件~/.bash_profile文件

export PATH=$PATH:/path/to/geckodriver

这里的路径一直到geckodriver下的bin目录

在安装完成后,终端会输出你的路径,在原来的路径后面加上bin就可以了。

最后执行代码让修改生效

source ~/.bash_profile
原文地址:https://www.cnblogs.com/guolaomao/p/8251431.html