rf-practice
Keyword Arguments

Context

Arguments make keywords flexible. Instead of writing a keyword for every possible value, you write it once and pass in the values it needs. This is how reusable automation building blocks are created.

Theory

User keywords declare their arguments with the [Arguments] setting, followed by scalar variables such as ${name}. When the keyword is called, the caller provides values in the same order, and those values become available inside the keyword body.

Task

  • Create a *** Keywords *** section.
  • Create a keyword named Greet that takes one argument: ${name}.
  • The keyword should log: Hello, ${name}!
  • Create test cases Greet Robot and Greet Tester that call Greet with different names.

Checks

Defines a *** Keywords *** section
Defines a keyword named Greet
Greet accepts a ${name} argument
Has a test case named Greet Robot
Has a test case named Greet Tester
Greet Robot passes
Greet Tester passes