RIDE是robotframework的图形操作前端,我们在RIDE上进行测试用例设计和编写测试脚本,并执行自动化测试。
而RIDE是基于Python下的一个GUI库---wxPython库开发的,可是wxPython之前始终都不支持Python3.x,导致RIDE也无法支持Python3.x。所以,之前为了可以用RIDE不得不坚持使用Python2.x。
但现在wxPython可以支持Python3.x了,现在就基于Python3.x来安装RobotframeWork以及RIDE
1、更新pip
cmd进入到python下的Scripts文件夹运行python -m pip install --upgrade pip

如之前没有pip可运行easy_install.exe pip直接安装

2、安装robotframework
继续运行pip install robotframework

3、安装RIDE
再继续运行pip install robotframework-ride,会自动安装需要的全部依赖包

4、运行RIDE
还是在python下的Scripts文件夹运行python ride.py

会自动启动RIDE的操作界面,可以通过设置Tools,单击 Create RIDE Desktop Shortcut 在桌面上创建 RIDE 快捷方式,以后就不需要每次在cmd通过命令行来启动了

5、安装常用第三方库
RIDE在使用时需要导入第三方Library,导入前需要安装,如未安装在界面会显示红色,可以提前将常用的Library装好,其他的可以在使用过程中需要时再添加

安装Selenium2Library(Selenium的web测试库)运行pip install robotframework-selenium2library

安装DatabaseLibrary(数据库)运行pip install robotframework-databaselibrary

安装RequestsLibrary(http Request库)运行pip install robotframework-requests

安装HttpLibrary运行pip install robotframework-httplibrary

安装AutoItLibrary(用于自动化 Windows GUI 的免费工具)运行pip install robotframework-autoitlibrary
安装AppiumLibrary(用于APP自动化)运行pip install robotframework-appiumlibrary

安装好后这些库都在都在python的..\Lib\site-packages目录下

或者也可以通过pip list命令查看已安装的库

安装好之后,重启RIDE再查看就都变成黑色表示导入成功

网友评论