在Mac下搭建Selenium+Python环境

需要安装的软件

1.Python(mac自带Python 2.7的环境,所以无需安装)

环境搭配:selenium 2 + Firefox 46及以下版本兼容,selenium 3 + Firefox 47 + geckodriver

2.pip(专门安装python包的工具)


sudo easy_install pip

3.selenium 2.53.6


pip install --user selenium==2.53.6

4.Firefox 44.dmg

下载地址:https://download-installer.cdn.mozilla.net/pub/firefox/releases/

测试环境是否搭建成功:


$ python

>>> from selenium import webdriver

>>> webdriver.Firefox()

5.Pycharm

在官网下载Mac版本,傻瓜式安装;

打开软件在License server address中填入http://xidea.online,然后点击Activate即可顺利破解!

猜你喜欢

转载自www.cnblogs.com/Jadie/p/9050094.html
今日推荐