参考文档:http://www.howtobuildsoftware.com/index.php/how-do/bZ7q/robotframework-setup-teardown-robot-framework-more-than-one-keyword

Setup/Teardown Robot Framework more than one keyword?

Is it possible to add to test Setup/Teardown procedure in Robot Framework more than one keyword?

Best How To :

Yes. Use the Run Keywords keyword, and use the special argument AND to separate your keywords.

For example:

*** Settings ***
| Test Setup | Run keywords
| ... | A keyword | with | arguments
| ... | AND | Another keyword | with | arguments
| ... | AND | One more keyword

Note that my use of the pipe-separated format isn't intended to imply that it's the only format you can use in this situation. You can use any supported format with this solution. For example, here is the same thing using the space-separated format:

*** Settings ***
Test Setup Run keywords
... A keyword with arguments
... AND Another keyword with arguments
... AND One more keyword

[Robot Framework] 如何在Setup中用Run Keywords执行多个带参数的关键字的更多相关文章

  1. Robot Framework 源码阅读 day1 run.py

    robot里面run起来的接口主要有两类 run_cli def run_cli(arguments): """Command line execution entry ...

  2. 基于RFS(robot framework selenium)框架模拟POST/GET请求执行自动化接口测试

    打开RIDE添加测试用例 如: Settings         Library Collections       Library RequestsLibrary       Test Cases ...

  3. 【转载】扩展Robot Framework,实现失败用例自动再执行(失败重跑)

    使用自动化脚本进行测试,经常受环境影响等各方面导致本能成功的脚本失败,下面介绍了RFS框架下,失败重跑的方法: 通过改写RobotFramework源代码增加--retry选项,实现test级别的失败 ...

  4. [Robot Framework] Jenkins上调用Rebot命令时执行报错不往下执行其他命令

    在配置jenkins job时,添加构建步骤Execute Windows batch command,输入执行rebot命令 报错信息: Call C:\Python27\Scripts\rebot ...

  5. Robot Framework操作

    Robot Framework 介绍 RobotFramework是一款基于python的开源自动化测试框架,遵守Apache License 2.0协议,在此协议下所有人都可以免费开发和使用.因为R ...

  6. Appium、selenium与Robot Framework

    Robot Framework + Appium Appium-Python-Client: 与Appium Library和Appium Server的交互Appium Library通过Appii ...

  7. Robot Framework(一)入门

    1.1简介 Robot Framework是一个基于Python的,可扩展的关键字驱动的测试自动化框架,用于端到端验收测试和验收测试驱动开发(ATDD).它可用于测试分布式异构应用程序,其中验证需要涉 ...

  8. Robot Framework(十四) 扩展RobotFramework框架——创建测试库

    4.1创建测试库 Robot Framework的实际测试功能由测试库提供.有许多现有的库,其中一些甚至与核心框架捆绑在一起,但仍然经常需要创建新的库.这个任务并不复杂,因为正如本章所示,Robot ...

  9. Robot Framework:环境安装

    Windows Python2.7                                                前置条件:安装python2.7,下载地址:https://www.p ...

随机推荐

  1. 接收Android数据 递归显示表格数据

    <html> <head> <title>展示</title> <script type="text/javascript" ...

  2. Python 基础常用

    .连接符: + .基本类型: [] {} () list set :无序,不重复的集合 数据初始化: a = set('a','b'); 或者 {'1'} #只能初始化空的集合: 相关函数: 添加数据 ...

  3. CentOS7 安装 GitLab

    虽然GitHub已经很好了,但是我们必须联上公网才可以使用并且如果不付费的话,你的代码在网上就是公开的!但是在企业环境中,我们公司的代码不希望被公开并且也不想付费给GitHub,这时怎么办呢?我们可以 ...

  4. SML + NL + HJ

    Join是一种试图将两个表结合在一起的谓词,一次只能连接2个表,表连接也可以被称为表关联.在后面的叙述中,我们将会使用”row source”来代替”表”,因为使用row source更严谨一些,并且 ...

  5. Jenkins安装部署(一)

    环境准备 CentOS Linux release 7.4 1.IP:192.168.43.129 2.路径:/mnt 3.jdk版本:jdk1.8.0 4.tomcat版本:tomcat-8.5 5 ...

  6. TOJ 3589 likaer的最长点距

    传送门:http://acm.tzc.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=3589 时间限制(普通/Jav a) ...

  7. 100-days: Five

    Title: Feel better now ? The rise and rise of the anxiety economy(焦虑经济) rise and rise 一直上升 anxiety n ...

  8. PAT L2-013 红色警报(并查集求连通子图)

    战争中保持各个城市间的连通性非常重要.本题要求你编写一个报警程序,当失去一个城市导致国家被分裂为多个无法连通的区域时,就发出红色警报.注意:若该国本来就不完全连通,是分裂的k个区域,而失去一个城市并不 ...

  9. shelve

    shelve是对pickle的封装 json & pickle是把所有的数据全部封装,一次性写入文件,而shelve可以把数据分类,以键值对的形式分别写入文件 shelve模块是一个简单的k, ...

  10. Tomcat配置远程调试端口(windows、Linux)

    当我们需要定位生产环境问题,而日志又不清晰的情况下,我们可以借助Tomcat提供的远程调试,设置如下: // Linxu系统: apach/bin/startup.sh开始处中增加如下内容: decl ...