From the course: Robot Framework Test Automation: Level 1 (Selenium)

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

List variables

List variables

In this video, I'm going to talk about list variables. List variables are used for holding multiple values, and this could be useful if you had a username and password that you wanted to pass together with one variable instead of passing two variables, or something like a series of coordinates that was needed for a particular test case, you could put all the coordinates in one bucket and pass them into the keyword. You'll notice that the syntax is very similar to the scalar variables. The only difference is we're using an at sign instead of a dollar sign. You can see that we still have two approaches. The first one is what we use in the variables section of the script file or keyword file, and the second one can be used directly inside of a test case or keyword. Since there are multiple values inside the variable, the syntax for retrieving data is different from a scalar variable. You can see that I'm still using log, but again I've changed the dollar sign to @, and at the end here…

Contents