如何使用 Robot Frame Ride 执行分支语句?
How do I use Robot Frame Ride execute branch statements?
我正在使用 Robot Framework Ride 进行 运行 测试。
这是测试用例结构:
if A>B:
print 1
print 2
print 3
if C>D:
print 4
print 5
我没有找到在一个命令下执行多个命令的方法 if
。我找到一个关键字Run Keyword if
,但它只能执行一条语句。
有许多与条件步骤相关的机器人框架关键字。最常见的是 Run keyword if. If you want to run multiple commands you can combine that with Run keywords。
例如:
*** Test cases ***
| Example
| | run keyword if | ${a} > ${B} | Run keywords
| | ... | log to console | 1
| | ... | AND | log to console | 2
| | ... | AND | log to console | 3
BuiltIn library 记录了机器人框架附带的所有关键字。
我正在使用 Robot Framework Ride 进行 运行 测试。 这是测试用例结构:
if A>B:
print 1
print 2
print 3
if C>D:
print 4
print 5
我没有找到在一个命令下执行多个命令的方法 if
。我找到一个关键字Run Keyword if
,但它只能执行一条语句。
有许多与条件步骤相关的机器人框架关键字。最常见的是 Run keyword if. If you want to run multiple commands you can combine that with Run keywords。
例如:
*** Test cases ***
| Example
| | run keyword if | ${a} > ${B} | Run keywords
| | ... | log to console | 1
| | ... | AND | log to console | 2
| | ... | AND | log to console | 3
BuiltIn library 记录了机器人框架附带的所有关键字。