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}
关闭浏览器

最新文章

  1. SqlServer简单数据分页
  2. BZOJ3944 Sum
  3. VC++6.0 配置CppUTest测试环境
  4. java的Map及Map.Entry解析
  5. [Scrapy] Mac安装Scrapy
  6. 从python中copy与deepcopy的区别看python引用
  7. 设计main函数退出后继续执行一段代码
  8. c++ 基础学习: 左值 概念cocos2d-x3.0的实际应用
  9. Freemarker 对null值报错的处理
  10. git新手碰到的各种奇葩问题之一
  11. YUM常用命令介绍
  12. UE4利用Save Game创建全局变量
  13. vue2-通过axios实现数据请求
  14. hihocoder编程练习赛75
  15. python的队列和栈
  16. servlet路径获取
  17. js字符串和控制语句
  18. YARN Architecture
  19. vi/vim基本使用方法(转)
  20. ORA-01652: 无法通过 128 (在表空间 TEMP 中) 扩展 temp 段(EXP-00056: 遇到 ORACLE 错误 1652 ORA-01652: unable to extend temp segment by 128 in tablespace TEMP)

热门文章

  1. cuDNN 功能模块解析
  2. 分布式 redis 延时任务 基于 springboot 示例
  3. Spring Aop的执行顺序
  4. java面试必知必会——排序
  5. mybatis——解决属性名和数据库字段名不一致问题
  6. SpringBoot2 参数管理实践,入参出参与校验
  7. 这 7 个 Linux 命令,你是怎么来使用的?
  8. 【linux】驱动-13-阻塞与非阻塞
  9. [非专业翻译] 高性能对象映射框架 - Mapster
  10. theUnforgiven——项目冲刺