mac os 安裝 geckodriver

連接:bash

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

在網上搜了不少方法,都是又麻煩又不起做用。code

最後仍是在這個網站找到簡潔方便的方法。blog

 

首先經過brew 安裝rem

$ brew install geckodriver

而後設置配置文件~/.bash_profile文件selenium

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

這裏的路徑一直到geckodriver下的bin目錄class

在安裝完成後,終端會輸出你的路徑,在原來的路徑後面加上bin就能夠了。配置

最後執行代碼讓修改生效file

source ~/.bash_profile
相關文章
相關標籤/搜索