参考文档: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. SSM框架下,使用ajax请求上传文件(doc\docx\excel\图片等)

    1.准备工作 1.1.添加上传必要jar包 <dependency> <groupId>commons-io</groupId> <artifactId> ...

  2. NBU 还原LINUX ORACLE RAC数据库(CRM)

    CRM集群数据库恢复 linux centos 6.6 oracle 11.2.0.3 集群环境 1.53 oraclea 1.54 oracleb 在linux操作系统root用户下安装好NBUci ...

  3. Mysql 表 创建 / 删除(基础3)

    创建表 语法:  #进入数据库 mysql> use mydb123; Database changedmysql> select database();+------------+| d ...

  4. linux 根据服务名称批量杀死进程

    ps -ef |grep python |awk '{print $2}'|xargs kill -9

  5. day11 闭包函数和装饰器

    1.函数不是新知识点 主要是学习函数的用法 在面向对象编程中,一切皆对象,函数也不例外 具体的表现 1.函数可以引用 2.函数可以作为函数的参数 3.函数可以作为函数的返回值 4.可以被存储到容器类型 ...

  6. zookeeper报错: org.I0Itec.zkclient.exception.ZkMarshallingError: java.io.EOFException

    zookeeper报错: org.I0Itec.zkclient.exception.ZkMarshallingError: java.io.EOFException 主要因为是没有序列化. 可以使用 ...

  7. scrollIntoView 顶部与视图(容器)对齐

    调用方法为 element.scrollIntoView() 参数默认为true. 参数为true时调用该函数,页面(或容器)发生滚动,使element的顶部与视图(容器)顶部对齐: 参数为false ...

  8. 二叉树,B树,B+树,红黑树 简介

    什么是二叉树? 在计算机科学中,二叉树是每个节点最多有两个子树的树结构.通常子树被称作“左子树”和“右子树”,左子树和右子树同时也是二叉树.二叉树的子树有左右之分,并且次序不能任意颠倒.二叉树是递归定 ...

  9. TOJ3112: 单词串串烧(回溯)

    传送门(<--可以点击的) 时间限制(普通/Java):1000MS/3000MS     内存限制:65536KByte 描述 “单词串串烧”是一款拼词智力游戏,给定4*4的方格,随机取16个 ...

  10. JSP跳转到指定位置

    通常情况下用如下写法即可 onclick='window.location.hash = "某元素的id";' 但我的元素是动态生成的,直接生成代码附带多个单引号和双引号,js语言 ...