Run Keyword And Ignore Error,Run Keyword And Return Status,Run Keyword And Continue On Failure,Run Keyword And Expect Error,Wait Until Keyword Succeeds用法

*** Test Cases ***
case1
#即使错误也继续执行,也不记录失败,且可以返回执行状态和错误信息
${Run Keyword And Ignore Error status} ${statusValue} Run Keyword And Ignore Error Click Element //span[@title="aaa"]
#执行关键字,返回执行成功或者失败状态,True和False
${Run Keyword And Return status} Run Keyword And Return Status Click Element //span[@title="aaa"]
${message} Set Variable Are your sure?
#即使错误也继续执行,不中止用例,但是会记录失败
Run Keyword And Continue On Failure Should Be Equal ${message} Are your sure?
#这个会报失败
Run Keyword And Continue On Failure Click Element //span[@title="aaa"]
#执行关键字,匹配失败的信息,如果关键字执行成功,则Run Keyword And Expect Error 失败。比如evaluate 1/0肯定会失败,则catch失败信息
${msg} = Run Keyword And Expect Error * evaluate 1/0
Should Start With ${msg} Evaluating expression ‘1/0‘ failed: ZeroDivisionError: integer division or modulo
#重复执行关键字
Repeat Keyword 2 Log repeat
#在规定时间规定频率内执行关键字,直到成功。如果超时还未成功,则失败,终止用例执行。
Wait Until Keyword Succeeds 10s 2s log Wait Until Keyword Succeeds 执行成功
Wait Until Keyword Succeeds 10s 2s evaluate 1/0

原文地址:https://www.cnblogs.com/pengwue/p/10521396.html

时间: 2024-11-02 17:04:06

Run Keyword And Ignore Error,Run Keyword And Return Status,Run Keyword And Continue On Failure,Run Keyword And Expect Error,Wait Until Keyword Succeeds用法的相关文章

Robotframework之Run Keyword And Return Status和Run Keyword

今天在android项目中遇到一个问题,场景达人每天第一次接单时,会弹出提示框:每日完成订单配送后将扣取1元保险费,是否确认接单?,点击确定后,才能接单成功,并且只有每天第一次接单才会弹出 如下图 此处要判断当前的接单是不是第一次接单,如果是第一次接单,点击确定,如果不是第一次接单,在接单页面点击接单后,直接接单成功,思路: 用Run Keyword And Return Status关键字判断页面是否有提示框弹出,如果有提示框弹出,用Run Keyword关键字执行点击确定按钮操作. 具体实现

Eclipse build error 解决方法The library '*.jar' contains native libraries that will not run on the dev

[2013-08-29 16:56:58 - jarsotest] The library 'wnp.jar' contains native libraries that will not run on the device. [2013-08-29 16:56:58 - jarsotest] The following libraries were found: [2013-08-29 16:56:58 - jarsotest]  - bin/classes/jni/wnptest/wnpj

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.38/images/json: dial unix /var/run/docker.sock: conne

使用docker报如下错误信息: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.38/images/json: dial unix /var/run/docker.sock: connect: permission denied 过程:早先是以root

Oracle Error - "OCIEnvCreate failed with return code -1 but error message text was not available".

ISSUE: When trying to connect to an Oracle database you receive the following error: "OCIEnvCreate failed with return code -1 but error message text was not available" CAUSE: 以下两种情况之一是可能的原因: 1,你在 Windows 7 上使用不支持的版本的 Oracle 客户端 (超过 11.2). 2,从以前安

自定义库引用时编译出错“collect2: error: ld returned 1 exit status”

想必很多人都遇到过这样的事情,需要写一个共享库,这个库又不能让所有的人都了解里面是怎么实现的,所以只能提供一个库出来供项目使用,可能是处于保密.核心业务的需要,这些都能够理解.笔者也写了一个简单的东西测试了一下,里面还是有不少东西. "collect2: error: ld returned 1 exit status"首先就遇到了这个问题.查了一下,这种错误网上说法也一大堆,起作用的还不多.在android系统里面加的共享库,需要加"namespace android &q

gcc/g++ 编译时出现:“对’xxxx’未定义的引用,collect2: error: ld returned 1 exit status” 的错误

出现的问题: 在使用 make 编译实现一个程序时,出现了下面的错误.查看程序源文件所在的目录时发现程序已经完成了编译,并生成了 list_repo.o 的文件,说明是在程序链接生成可执行文件时发生了问题. storages/local.o:在函数‘LocalStorage::init(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,

error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

Windows服务器Azure云编译安装MariaDB教程 www.111cn.net 编辑:future 来源:转载 安装MariaDB数据库最多用于linux系统中了,下文给各位介绍在Windows服务器Azure云编译安装MariaDB教程,希望本文能帮助到各位. 试用1元Windows Azure,带宽都是杠杠的.下面演示下Windows Azure下编译安装LNMP环境,系统环境是Ubuntu 14.04 TLS版 软件版本: 数据库:mariadb-10.0.13 Stable PH

NMAKE:fatal error U1077.“\..\.cl.exe” return code 0xc0000135

NMAKE:fatal error U1077.“cl.exe” return code 0xc0000135 产生原因:在安装visual studio的时候没有勾选注册环境变量导致的. 解决办法:在系统环境变量中加入visual studio的安装路径:vs安装路径\VC\Bin,以及vs安装路径\Common7\IDE

php7 编译 collect2: error: ld returned 1 exit status

/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_strdup'/usr/bin/ld:note: 'ber_strdup' is defined in DSO /lib64/liblber-2.4.so.2 so try adding it to the linker command line/lib64/liblber-2.4.so.2:could not read symbols: Invalid