From the course: Robot Framework Test Automation: Level 2

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Refactor data entry steps

Refactor data entry steps

- [Instructor] So I don't have it listed here in these steps but there's one more thing we need to do. Inside of Attempt Login and Verify Login Page Error Message, we need to drill into these sign in steps. You were passing in credentials. And before, we were using a dictionary so we could simply say Credentials.Email and Credentials.Password. But we're not dealing with a dictionary anymore, we're dealing with a list of individual values, so we need to reference them by list index. Zero, one, two, three, four, that whole thing. Let's take a look at how to do that. Way back in the level one course, you may recall that I mentioned that list variables are zero-based and the way that you access the elements inside of a list is inside the list here. Create square brackets and pass in the index. So I'm saying inside this credentials collection here, take the zeroth element, which is the first one. We have three elements: email address, password, and error message. The email address is going…

Contents