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 - Selenium Tutorial
From the course: Robot Framework Test Automation: Level 2
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
Overview of the steps1m 59s
-
(Locked)
Create the CSV data file2m 45s
-
(Locked)
Custom CSV parsing library4m 15s
-
(Locked)
Create our data manager3m 3s
-
(Locked)
Call the data manager3m 26s
-
(Locked)
Create the looping keyword file3m 58s
-
(Locked)
Refactor data entry steps1m 47s
-
(Locked)
Run and debug5m 2s
-
(Locked)
Add error handling59s
-
-