Robotframework -- Run Keyword关键字

来源:互联网 发布:unity3d 动画循环播放 编辑:程序博客网 时间:2024/05/22 14:49

Robotframework – Run Keyword关键字

  1. Run Keyword
  2. Run Keywords
  3. Run Keyword If:
    runs the given keyword with the given arguments, if ‘condition’ is true.
    另外, 该关键字还可以与ELSE,ELSE IF 一起使用,用于选择分支结构.
  4. Run Keyword Unless:
    runs the given keyword with the given arguments, if ‘condition’ is false.
  5. Run Keyword And Ignore Error
  6. Run Keyword And Continue On Failure
  7. Run Keyword And Expect Error
  8. Repeat Keyword
  9. Wait Until Keyword Succeeds

举例

*** Test Cases ***case1${var}    Set Variable    logRun Keyword    ${var}    abcRun Keywords    ${var}    abc...    AND    ${var}    EFGRun Keyword If    '${var}'=='log'    ${var}    iflogRun Keyword Unless    '${var}'=='test'    ${var}    unlessRun Keyword And Ignore Error    Fail    ignore${status}    Run Keyword And Return Status    Log    seleniumRun Keyword And Continue On Failure    FailRun Keyword And Expect Error    *    FailRepeat Keyword    2    Log    repeatWait Until Keyword Succeeds    30s    5s    Log    aaa
原创粉丝点击