Skip to content
Bassam Khouri edited this page Nov 28, 2017 · 4 revisions

The Keyword class represents a robotframework keyword. An instance of this object is what is passed to instances of The KeywordRule class. It has the following attributes:

  • linenumber contains the line number in the suite or resource file where this keyword definition begins
  • name contains the name of the keyword
  • parent contains a reference to the parent (suite or resource file) object in which this keyword is defined.
  • path is an absolute path for the file that contains this keyword
  • rows is a list of Rows in the keyword. A row is built from one line of text in the source file, and is parsed to be a list of strings.
  • settings is a list of Statements for the settings in a keyword.
  • statements is a list of all Statements in the keyword. In effect, this is the combination of steps and settings
  • steps is a list of Statements in the keyword, excluding settings.
  • tags is a list of tags defined in the keyword (note: robotframework keywords don't currently support tags, but hopefully some day they will. Until then, this attribute will always be an empty list).