selenium+python環(huán)境搭配:
selenium2+firefox46以下版本(無需驅(qū)動包)
selenium3+firefix47以上版本(需geckodriver.exe)
建議學習的話用selenium2比較好,筆者現(xiàn)在用的是selenium3.3.1.jar,geckodriver.exe V.15.0,firefox 48.0.2切記修改firefix不檢查更新。
若pip show selenium 出現(xiàn)failed to create process,可以用python -m pip 試試,因為我裝了2個python版本,所以得加上python2

配置完編寫如下代碼測試瀏覽器:

各firefox版本下載地址:http://ftp.mozilla.org/pub/firefox/releases/
geckodriver.exe各個版本下載:https://github.com/mozilla/geckodriver/releases/
參考博客園:http://www.cnblogs.com/xiaozhougogo/p/7590623.html
參考博客園:http://www.cnblogs.com/tester808/p/6674588.html