目录
第一章.环境安装
平台环境:windows
python版本:3.7
1.安装python+selenium
在官网下载最新的python3.7 版本,Path中设置环境变量路径。本机电脑Python安装路径和Python Scripts文件路径:
C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32;C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\Scripts
python SCripts 路径下自带的Pip 是10.0.1 版本,使用Pip 安装selenium。安装命令:pip install -U selenium
2.安装浏览器驱动
安装完selenium后,本机是使用chrome浏览器,安装chrome的驱动,FireFox不需要安装驱动。
驱动网址http://npm.taobao.org/mirrors/chromedriver/
根据chrome浏览器选择正确的版本,chrome浏览器使用chrome://version查询,如图:
选择的Chrome驱动:
将解压的文件目录放置到chrome浏览器安装的Application 目录下。如图: