Robot Framework 用Run Keyword If 关键字做条件判断
run keyword if '123' in $var and '456' in $var log to console 内容
run keyword if 条件 结果
多行写法,换行时需要加上三个点... 后面的语句必须加上2个以上的空格
${chengji} get value from user 请输入您的成绩 60
run keyword if ${chengji}==100
... log to console 太棒了!
... ELSE IF ${chengji} > 80 and ${chengji} < 90 log to console 很好
... ELSE log to console 加油哦
注意 *ELSE 和 ELSE IF 作为run keyword if 的分支,必须大写
加入循环的判断
:FOR ${var} IN RANGE 5
\ ${chengji} get value from user 请输入您的成绩 60
\ run keyword if ${chengji}==100
\ ... log to console 太棒了!
\ ... ELSE IF ${chengji} > 80 and ${chengji} < 90 log to console 很好
\ ... ELSE log to conso