Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Keyword If not in Robot framework?

Hi I want to run a keyword if some boolean is false, I am doing this to run a keyword if Bool is true but how can i run the keyword if Bool is false

Run Keyword If    ${Bool}
like image 937
Said Saifi Avatar asked Aug 10 '16 14:08

Said Saifi


2 Answers

Use Unless.

Run Keyword Unless   ${Bool}
like image 69
Robert Columbia Avatar answered Oct 07 '22 02:10

Robert Columbia


Alternative - negate the bool value:

Run Keyword If    not ${Bool}
like image 24
Todor Minakov Avatar answered Oct 07 '22 01:10

Todor Minakov