当前位置:网站首页>Run keyword if usage details
Run keyword if usage details
2022-07-21 05:21:00 【51CTO】
5.1 Statement Introduction
robotframework Medium if The statement uses the keyword Run Keyword If To replace
Run Keyword If
Function interpretation : If the given judgment conditions are met , Execute the given keywords .
Example of function structure :
Run Keyword If Judge the condition Other keywords
... ELSE IF Judge the condition Other keywords
... ELSE Judge the condition Other keywords
5.2 Examples of use
The example demonstrates using the software version :robotframework2.7.5,ride1.1
5.2.1 Judge the condition — Digital comparison
5.2.2 Judge the condition — Character contrast
Be careful :
1. Variable ${var} When the value is a character , In the judgment condition, it needs to add single quotation mark or double quotation mark ( As shown in the red box above ), by ’${var}’ perhaps ”${var}”.
2. In judging conditions , And variables ${var} The character constant of comparison also needs single quotation mark or double quotation mark , by ’tttt’ perhaps ”tttt”.
5.2.3 Judge the condition — Boolean type comparison
Be careful :
1. Variable ${var} The value is true or false when , In the judgment condition, it needs to add single quotation mark or double quotation mark , by ’${var}’ perhaps ”${var}”.
2. In judging conditions , And variables ${var} The Boolean value of comparison also needs to be enclosed in single quotation marks or double quotation marks , by ’${true}’ perhaps ”${true}”.
5.2.4 Judge the condition — Whether the list contains elements
Be careful :
1. Variable ${string} When the value is a character , In the judgment condition, it needs to add single quotation mark or double quotation mark , by ’${string}’ perhaps ”${string}”.
5.2.5 Judge the condition — Compare whether the list is equal to the list
5.2.6 Judge the condition — List element comparison
Be careful :
1. List element value ( Such as in the figure above @{varlist2}[1]) When is a character , In the judgment condition, it needs to add single quotation mark or double quotation mark , As shown in the figure below @{varlist2}[1], Turn into ’@{varlist2}[1]’ perhaps ”@{varlist2}[1]”.
5.2.7 Execute multiple Judge the condition
边栏推荐
猜你喜欢
Addition, deletion, query and modification of MySQL [advanced]
MySQL JDBC programming
Shell script learning
One question per day · 731 My schedule | · array
02 requses request Library
Loop filtering using SSIM based CNN
小程序毕设作品之微信运动场地预约小程序毕业设计(5)任务书
MySQL indexes and transactions
Autojs learning coin games
01 课程简介&爬虫概述
随机推荐
ASP.NET CORE 自定义中间件
PO,BO,VO,DTO和POJO的概念区分
MySQL表的增删改查(初阶)
go Timer
DeFi 2.0的LaaS协议,重振DeFi赛道发展的关键
How much money do young people who do 3D, digital people and metauniverse make?
小程序毕设作品之微信运动场地预约小程序毕业设计(6)开题答辩PPT
scanpy1.9.1里的文件在scanpy1.7.2无法读取问题解决
Bipartite graph--
每日三题 7.16
go sync包
AutoJs学习-投币小游戏
extern 、static 作为全局变量的使用与差异
Svn tag, branch management, merge merge conflict
逆向分析工具IDA与开源工具Ghidra、Cutter对比测评
小程序毕设作品之微信运动场地预约小程序毕业设计(7)中期检查报告
[Verilog digital system design (Xia Yuwen) -- basic knowledge of Verilog 1]
每日三题 7.15
SQLite memory mode save
Error: Cannot run with sound null safety, because the following dependencies don‘t support null safe