robotframework - PO设计
1、添加新建好的资源
2、测试用例原始代码如下(未做任何分离的数据)
*** Settings ***
Library SeleniumLibrary
Resource UI分层一.txt
Resource UI分层二.txt
*** Test Cases ***
测试用例原始代码
Open Browser https://www.baidu.com firefox
Input Text id = kw selenium
Click Button id = su
Wait Until Page Contains Element css = #su
sleep 2
${title} get title
Should Contain ${title} selenium_百度搜索
Close Browser
3、调用 UI分层一
*** Settings ***
Library SeleniumLibrary
*** Keywords ***
打开浏览器
[Arguments] ${url} ${webdriver}
Open Browser ${url} ${webdriver}
输入框
[Arguments] ${search}
Input Text id = kw ${search}
点击百度搜索按钮
Click Button id = su
等待时间
sleep 2
验证标题
[Arguments] ${result}
${title} get title
Should Contain ${title} ${result}
关闭浏览器
Close Browser
4、调用 UI 分层二
*** Settings ***
Library SeleniumLibrary
Resource UI分层一.txt
*** Keywords ***
验证百度搜索
[Arguments] ${url} ${driver} ${input} ${text}
打开浏览器 ${url} ${driver}
输入框 ${input}
点击百度搜索按钮
等待时间
验证标题 ${text}
关闭浏览器
最新文章
- SqlServer简单数据分页
- BZOJ3944 Sum
- VC++6.0 配置CppUTest测试环境
- java的Map及Map.Entry解析
- [Scrapy] Mac安装Scrapy
- 从python中copy与deepcopy的区别看python引用
- 设计main函数退出后继续执行一段代码
- c++ 基础学习: 左值 概念cocos2d-x3.0的实际应用
- Freemarker 对null值报错的处理
- git新手碰到的各种奇葩问题之一
- YUM常用命令介绍
- UE4利用Save Game创建全局变量
- vue2-通过axios实现数据请求
- hihocoder编程练习赛75
- python的队列和栈
- servlet路径获取
- js字符串和控制语句
- YARN Architecture
- vi/vim基本使用方法(转)
- ORA-01652: 无法通过 128 (在表空间 TEMP 中) 扩展 temp 段(EXP-00056: 遇到 ORACLE 错误 1652 ORA-01652: unable to extend temp segment by 128 in tablespace TEMP)