Splinter介绍
Splinter是一个用Python语言开发的开源web应用测试工具;
Splinter对已有的自动化工具(如:Selenium、phantomJS)进行抽象,形成一个全新的上层应用API,使用它编写web自动化脚本变动更加容易;
Splinter安装
Splinter依赖以下包:
Selenium(版本>=24)
Django(1.7>版本>=1.5.8)
Flask(版本>=0.10)
lxml(版本>=2.3.6)
zope.testbrowser(版本>=4.0.4)
注:前提是环境中已经安装好Python,小编的测试平台是window10x64
1.从Python官网(https://pypi.python.org/pypi/splinter/)上下载Splinter;

2.将下载好的splinter解压缩到指定的文件夹中,小编的目录是D:\soft\soft\Splinter

3.使用cmd进入终端,并cd到splinter解压缩后得目录

4.使用命令Python setup.py build构建一下

5.执行脚本命令Python setup.py install 进行安装splinter

6.检查splinter是否安装成功,在Python从splinter.browser中导入Browser,没有任何报错就是splinter安装成功了

7.下载火狐浏览器驱动Geckodriver(https://github.com/mozilla/geckodriver/releases),启动浏览器并进入百度页面,

网友评论