03-Robot Framework教程-运行多个关键字(三)


Robot Framework 运行多个关键字可以使用AND。例如:

*** Test Cases ***
Multiple Keywords
    Run Keywords    foo func first  AND   foo func second

*** Keywords ***
foo func first
   Log To Console  \n first

foo func second
   Log To Console  \n second

上面的用例Multiple Keywords 同时运行了两个关键字foo func first和foo func second

输出结果

Output

Sample

Multiple Keywords
first

second

Multiple Keywords | PASS |