花时间读了《Selenium2自动化测试实战基于Python语言》,所以总结还是必要的:温故而知新!
惯例介绍:
一、简介
Selenium主要用于Web应用程序的自动化测试,但并不局限于此,它还支持所有基于Web的管理任务自动化。
实际操作:
一、环境搭建(Windows,Mac之后有时间再写)
1、Python
1.1使用Python 3.X版本
1.1.1下载地址:https://www.python.org/downloads/release/python-364/
根据自己电脑配置选择下载(我选择的是64位)

Python下载文件版本
1.1.2安装:直接双击安装即可

Python下载文件

安装界面
如果“Add Python ....."自动添加失败,就需要自己手动添加环境变量了。

安装界面
1.1.3配置环境变量
首先使用cmd控制台查看是否安装成功,如果出现下图则表明安装成功,如果没有就请检查环境变量是否配置成功:

安装成功且环境变量配置成功

添加环境变量
2、pip
pip是一个安装和管理Python包的工具,通过pip来安装Python包变得十分简洁。
2.1下载地址:https://pypi.python.org/pypi/pip

下载压缩包
2.2安装pip

解压缩后文件
进入pip文件目录,使用指令进行安装pip:python setup.py install
2.2.1验证pip安装

成功安装
3、安装Selenium
之前安装pip就是方便安装Selenium包,通过pip命令可直接安装Selenium包(pip根据自己的需要自己选择)。
使用指令:pip install Selenium
至此环境已经搭建好了。
