Context
Keywords are the building blocks of Robot Framework. Besides using built-in and library keywords, you can define your own in the *** Keywords *** section. Custom keywords hide low-level details behind descriptive names, making suites easier to read and maintain.
Theory
A user keyword is defined by writing its name followed by indented keyword calls. Once defined, it can be called from any test case or from another keyword just like a built-in keyword. This turns repeated sequences into reusable, self-documenting actions.
Task
- Create a *** Keywords *** section.
- Define a keyword named Greet User that logs Hello, user!
- Create a test case named Keyword Test that calls Greet User.
Checks
Run your code to see terminal output.
Context
Keywords are the building blocks of Robot Framework. Besides using built-in and library keywords, you can define your own in the *** Keywords *** section. Custom keywords hide low-level details behind descriptive names, making suites easier to read and maintain.
Theory
A user keyword is defined by writing its name followed by indented keyword calls. Once defined, it can be called from any test case or from another keyword just like a built-in keyword. This turns repeated sequences into reusable, self-documenting actions.
Task
- Create a *** Keywords *** section.
- Define a keyword named Greet User that logs Hello, user!
- Create a test case named Keyword Test that calls Greet User.