Robot Framework Tutorial #38 – How to use IF ELSE in Robot Framework

In this Robot Framework Tutorial we will understand how to use if else in robot framework.

* If/Else – Conditional statement which runs a different set of statements depending on whether an expression is true or false

* Robot Framework has builtin library for this functionality

* You can also use multiple “ELSE IF” clause

* It can also have “ELSE” clause

* Format for IF/ELSE is as follows:

Run Keyword If  ${condition} == “Some Data”  Keyword1

… ELSE IF  ${condition} == “Some Other Data”  Keyword2

… ELSE Keyword3