RF常见问题

1、参数为空的写法:${empty}

CDP-008-03:验证新增事物类型时类型名不允许为空

     [Template]    编辑物品类型-前端_tp.前端提示

     ${empty}    name    0    物品类型名称不能为空

2.判断元素是否存在,根据存在与否进行下一步操作

${isExist}= Run Keyword And Return Status     Page Should Contain Element //div[@role="alert"]

    Run Keyword If    '${isExist}'=='True'  获取提示语  //div[@role="alert"]  ${tip}

4.if  判断条件后,进行多个关键字

Run Keyword IF   '${isExist}'=='True'     Run Keywords log    1  AND    log    2 

Run Keyword If   '${B_name}'=='${B}' and '${C}'== '0'   ,用and就可以了

你可能感兴趣的:(RF常见问题)