Run Keyword If: runs the given keyword with the given arguments, if ‘condition’ is true. 另外, 该关键字还可以与ELSE,ELSE IF 一起使用,用于选择分支结构.
Run Keyword Unless: runs the given keyword with the given arguments, if ‘condition’ is false.
Run Keyword And Ignore Error
Run Keyword And Continue On Failure
Run Keyword And Expect Error
Repeat Keyword
Wait Until Keyword Succeeds
举例:
*** Test Cases ***
case1
${var} Set Variable log
Run Keyword ${var} abc
Run Keywords ${var} abc
... AND ${var} EFG
Run Keyword If '${var}'=='log' ${var} iflog
Run Keyword Unless '${var}'=='test' ${var} unless
Run Keyword And Ignore Error Fail ignore
${status} Run Keyword And Return Status Log selenium
Run Keyword And Continue On Failure Fail
Run Keyword And Expect Error * Fail
Repeat Keyword 2 Log repeat
Wait Until Keyword Succeeds 30s 5s Log aaa