小编use*_*373的帖子

如何在Robot Framework中编写if语句的多个条件

if在Robot Framework中编写条件时遇到了麻烦.

我想执行

Run Keyword If '${color}' == 'Red' OR '${color}' == 'Blue'  OR '${color}' == 'Pink'    Check the quantity
Run Code Online (Sandbox Code Playgroud)

我可以Run keyword If在一个条件下使用这个" "关键字,但对于多个条件,我收到此错误:

失败:关键字名称不能为空.

我还想使用这些关键字:

Run Keyword If '${color} == 'Blue' AND '${Size} == 'Small' AND '${Design}' != '${Simple}'      Check the quantity
Run Code Online (Sandbox Code Playgroud)

Run Keyword Unless '${color}' == 'Black' OR '${Size}' == 'Small' OR '${Design}' == 'Simple'
Run Code Online (Sandbox Code Playgroud)

但我最终得到的错误.

python selenium python-2.7 robotframework

19
推荐指数
1
解决办法
8万
查看次数

标签 统计

python ×1

python-2.7 ×1

robotframework ×1

selenium ×1