Robot Framework Beginner Class 5 - How to use VARIABLES
What are Variables ?
Variables are elements used to store values that can be referenced by other elements
RobotFramework has 3 types of variables
SCALAR
LIST
DICTIONARY
we can also use
ENVIRONMENT variables
- Create a SCALAR variable for url and refer in TestCase
syntax : ${VariableName}
Right Click on Suite - Scalar variables
- Create a LIST variable for username and password and refer in TestCase
syntax : @{VariableName}
Accessing: ${LOGIN_DETAILS}[0]
- Create a DICTIONARY variable for username and password and refer inTestCase
syntax : &{VariableName}
Accessing: ${FieldValues}[x]
Environment
%{variable name}
ex: %{username} %{os}