[测试杂志] Robot FrameWork持续集成测试实战

2015年10月22日 328点热度 0人点赞 0条评论
↑ 点击上方“ 51Testing软件测试网 ”关注我们


图片

  一、64位PC上部署RobotFrameWork+Jenkins

  1.1 安装Python 2.7(64位)版本

  1.2 安装pip

  安装命令: python get-pip.py

  1.3 安装AutoItX-V3(AutoItLibrary库依赖于它)

  1.4 安装robot framework

  安装命令: pip install robotframework

  1.5 安装wxPython(支撑Ride的运行库)

  1.6 安装robotframework-ride(GUI界面管理)

  安装命令: pip install robotframework-ride

  1.7 安装selenium2library

  安装命令: pip install robotframework-selenium2library

  1.8 安装pyodbc

  安装命令:pip install pyodbc

  1.9 安装requests(支持RequestLibrary库)

  安装命令:pip install requests

  1.10 安装RequestsLibrary(http request库)

  安装命令: pip install -U robotframework-requests

  1.11 安装AutoItLibrary

  安装命令:pip install AutoItLibrary

  1.12 安装Openpyxl

  安装命令:pip install openpyxl

  1.13 安装Psutil

  安装命令:pip install psutil

  1.14安装JDK并配置环境变量

  1.15 下载jenkins.war包

  二、常用的三方库及其API

  2.1 Selenium2Library(浏览器&页面元素操作)

  2.1.1打开浏览器Open Browser

  示例:Open Browser http://192.168.10.206/somoStorage Chrome

  2.1.2 跳转到指定RUL地址Go To

  示例:Go To http://192.168.10.206/somoStorage

  2.1.3 点击元素Click Element

  示例: Click Element id= id=Main

  Click Element xpath=//div[@id="divLoading"]/img

  2.14 点击超链接Click Link

  示例:Click Link 添加

  Click Link //a[contains(.,'添加')]

  2.1.5 上传文件Choose File

  示例:Choose File xpath=//div[@id="divFiles"]/div[1]/input E:\\TestData\\14.jpg

  2.1.6 清空输入框Clear Element Text

  示例:Clear Element Text xpath=//li[@id="Monday"]/div[3]/div[2]/span[2]/input

  2.1.7 向输入框中填写内容Input Text

  示例:Input Text xpath=//li[@id="Monday"]/div[3]/div[2]/span[2]/input ${极限总号额}

  2.1.8 对话框作确定操作Confirm Action

  示例:Confirm Action

  2.1.9执行JS方法 Execute JavaScript

  示例:Execute JavaScript javascript:show_cate();

  2.1.10等待元素可见 Wait Until Element Is Visible

  示例:

  Wait Until Element Is Visible xpath=/html/body/div[1]/table/tbody/tr/td/div/div[2]/iframe 10s error=等待元素可见超时

  2.1.11 等待元素可用Wait Until Element Is Enabled

  示例:Wait Until Element Is Enabled xpath=/html/body/div[4]/div/div/div[1]/div[1]/div[2] 20s error=等待门诊预约元素超时

  2.1.12 锚定某个元素Focus

  示例:Focus id=btnGeneralSave

......

查看全文内容,请点击左下角“阅读原文”吧!

图片

52150[测试杂志] Robot FrameWork持续集成测试实战

这个人很懒,什么都没留下

文章评论