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

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…

Contents