Robotframework -- Run Keyword关键字
2017-07-17 19:32
141 查看
Robotframework – Run Keyword关键字
Run KeywordRun Keywords
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
相关文章推荐
- RobotFramework下的http接口自动化Get Response Status 关键字的使用
- 贯穿RobotFramework框架 - 关键字(一) 最全面的疏理
- RobotFramework下的http接口自动化Set Request Header 关键字的使用
- RobotFramework自动化2-自定义关键字
- 怎么样导入RobotFramework 自定义关键字(库文件)
- RobotFramework下的http接口自动化Get关键字的使用
- RobotFramework下的http接口自动化Create Http Context关键字的使用
- RobotFramework笔记:RIDE的相关知识及Resources创建关键字文件
- RobotFramework下的http接口自动化Get关键字的使用
- RobotFramework下的http接口自动化Set Request Body 关键字的使用
- RobotFramework下的http接口自动化post关键字的使用
- RobotFramework的Setup或Teardowm中执行多个关键字
- RobotFramework下的http接口自动化Follow Response关键字的使用
- RobotFramework-Selenium2Library--关键字
- 怎么样导入RobotFramework 自定义关键字(库文件)
- RobotFramework - AppiumLibrary 之关键字Open Application使用
- 解决RobotFramework的关键字不能高亮的问题
- RobotFramework之关键字
- robotframework关键字
- robotframework中自定义chromedriver的关键字