【RF库测试】对出错的处理
1、出错后继续执行:Run Keyword And Continue On Failure



2、获取关键字执行结果后继续执行:Run Keyword And Ignore Error
有时候,我们需要获取某个关键字的执行结果,然后根据结果做不同后续操作,这个时候,我们就会用到关键字Run Keyword And Ignore Error 。假设我们要执行一个关键字Mykeyword,关键字有一个返回值。我们可以如下使用:
Run Keyword And Ignore Error 有2个返回值${result}获取执行结果,值为PASS或者FAIL;${returnvalue}获取Mykeyword的返回值。
场景1:


场景2:


场景3:



场景4:



3、判断是否期望的错误发生:Run Keyword And Expect Error
场景1:


场景2:


场景3:


4、Runs the given keyword with given arguments and returns the status as a Boolean value.Run Keyword And Return Status


场景2:



【RF库测试】对出错的处理的更多相关文章
- 【RF库测试】DateTime库
术语说明: 1.Epoch指的是一个特定的时间:1970-01-01 00:00:00 UTC. 2.国际标准化组织的国际标准ISO 8601是日期和时间的表示方法,格式是 'YYYY-MM-DD h ...
- 【RF库测试】Encode String To Bytes&Decode Bytes To String& should be string&should be unicode string &should not be string
场景1:判断类型 r ${d} set variable \xba\xcb\xbc\xf5\xcd\xa8\xb9\xfd #核减通过 Run Keyword And Continue On Fail ...
- 【RF库测试】算法运算
- 【RF库测试】set variable if
- 【RF库测试】关键字get time
*** Test Cases ***Timestamp ${time} GET TIME ${secs} GET TIME epoch ${year} GET TIME return year ${y ...
- 【RF库测试】Variable Should not Exist & variable should exist
Variable Should not Exist variable should exist
- 【RF库测试】Exit For Loop 相关
1.Exit For Loop If:满足条件时,跳出循环,后面的循环不再执行 2.Continue For Loop If:满足条件时,跳出本次循环,继续执行后面的循环
- 无法将类型为“Excel.ApplicationClass”的 COM 对象强制转换为接口类 型“Excel._Application”。此操作失败的原因是对 IID 为“{000208D5 -0000-0000-C000-000000000046}”的接口的 COM 组件调用 QueryInterface 因以下错误而失败: 加载类型库/DLL 时出错。 (异常来 自 HRESULT:
无法将类型为“Excel.ApplicationClass”的 COM 对象强制转换为接口类 型“Excel._Application”.此操作失败的原因是对 IID 为“{000208D5 -000 ...
- 环境搭建、RF库
一.Python27安装 1.双击安装python-2.7.13-64位.msi 2.检查python:cmd命令行→[python]→回车,出现如图所示,表示成功 可能出现:'python'不是内部 ...
随机推荐
- cocos2d-html5学习笔记(六)--alpha2中cc.Sequence.create中的bug
cocos2d-html5学习笔记(六)--alpha2中cc.Sequence.create中的bug http://blog.csdn.net/allenice1/article/details/ ...
- 趣味SQL——创建指定的数据类型
原创作品,出自 "深蓝的blog" 博客,深蓝的blog:http://blog.csdn.net/huangyanlong/article/details/46908843 趣味 ...
- LDO和BUCK降压稳压器对比
LDO和BUCK降压稳压器对比 在采用MCU/DSP/FPGA设计的控制系统中,低压输入级(一般在12V以下),输出5V/3.3V/1.8V/1.5V/1.2V的电路中,常用的电源芯片是BUCK(降压 ...
- TCP/IP 端口大全
1 tcpmux TCP 端口服务多路复用 5 rje 远程作业入口 7 echo Echo 服务 9 discard 用于连接测试的空服务 11 systat 用于列举连接了的端口的系统状态 13 ...
- <class 'Salesman.admin.UsrUserAdmin'>: (admin.E012) There are duplicate field(s) in 'fieldsets[0][1]'.
ieldsets = ( ['Main', { 'fields': ('user_name', 'real_name', 'concat_name','phone_no','charge_person ...
- 从JSON数据中取出相关数据
参考: http://www.cnblogs.com/shuilangyizu/p/6019561.html JSON数据如下: { "total": 1, "rows& ...
- WebSocket的几个模块(node.js)(未完)
1.ws模块 npm install ws 2.nodejs-websocket npm nodejs-websocket 3.socket.io模块 npm install socket.io
- C++知识点 笔试常见
C++知识点 一.#include “filename.h”和#include <filename.h>的区别 #include “filename.h”是指编译器将从当前工作目录上开 ...
- vue-cli中实现全选、单选计算总价格(vue2.0)
<template> <div> <table> <tr> <td><input type="checkbox" ...
- xadmin 安装详解
1.安装必要的包 django>=1.9.0 django-crispy-forms>=1.6.0 django-import-export>=0.5.1 django-revers ...