From the course: Robot Framework Test Automation: Level 1 (Selenium)
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Moving keywords to resource files - Selenium Tutorial
From the course: Robot Framework Test Automation: Level 1 (Selenium)
Moving keywords to resource files
In the previous video, we broke our original script up into keywords to make it more readable. Now we're going to move forward by taking those keywords and placing them into an external resource file. The reasons why we might want to do that is because in our script file, we don't really want to have the clutter of all the execution steps. When business people or other QA people want to get a sense of what kind of coverage we have, they can go and look at the script file and get a sense for the test cases without being bothered by all the implementation details. So the way we're going to do this is to create two resource files in our resources directory. We're going to create "Amazon.robot" to hold our product related keywords and we'll create "Common.robot" to hold more generic keywords like opening and closing the browser, which really has nothing to do with the Amazon product itself. You'll find that'll be useful if you have multiple websites to test. You don't have to repeat the…
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
-
-
-
-
-
-
-
Overview6m 51s
-
(Locked)
Preview of the final solution6m 9s
-
(Locked)
Style: Procedural vs. Gherkin3m 11s
-
(Locked)
Introducing user-defined keywords5m 20s
-
(Locked)
Break the script into keywords7m 18s
-
(Locked)
Moving keywords to resource files7m 47s
-
(Locked)
Adding setup and tear down5m 36s
-
(Locked)
Overview of page objects7m 47s
-
(Locked)
Demo: Create a page object4m 7s
-
(Locked)
Increase readability using Gherkin7m 43s
-
-
-
-
-
-
-