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.
Add error handling - Selenium Tutorial
From the course: Robot Framework Test Automation: Level 2
Add error handling
- [Instructor] So hopefully you get a sense that this is a little more complex than using the built-in setup. But if you absolutely need to use an external CSV file like this, then that's how you do it. Last thing I want to mention here is the built-in mechanism is going to handle any errors within that looping process. When you do it this way, and you're inside this for loop, if any one of these things fails, this particular test case is going to bail out. So what we're going to have to do to manage those errors is inside this for loop you'll have to use run keyword and continue on failure in front of all of these steps of your loop. So that way it's going to run each of these keywords, and if anything fails it'll move on to the next keyword, and it'll keep your loop going. So hopefully that helps. I should also mention, I just closed and reopened the solution and this data manager line is no longer complaining with the red squiggly line. So it's just one of those PyCharm things…
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
-
-