I have trouble writing if
conditions in Robot Framework.
I want to execute
Run Keyword If '${color}' == 'Red' OR '${color}' == 'Blue' OR '${color}' == 'Pink' Check the quantity
I can use this "Run keyword If
" keyword with one condition, but for more than one conditions, I got this error:
FAIL: Keyword name cannot be empty.
And also I would like to use these keywords:
Run Keyword If '${color} == 'Blue' AND '${Size} == 'Small' AND '${Design}' != '${Simple}' Check the quantity
And
Run Keyword Unless '${color}' == 'Black' OR '${Size}' == 'Small' OR '${Design}' == 'Simple'
But I just end up getting errors.
This question is related to
python
python-2.7
selenium
robotframework
Just make sure put single space before and after "and" Keyword..
The below code worked fine:
Run Keyword if '${value1}' \ \ == \ \ '${cost1}' \ and \ \ '${value2}' \ \ == \ \ 'cost2' LOG HELLO
Source: Stackoverflow.com