Robot Framework
robot.result.model.Keyword Class Reference

Represents results of a single keyword. More...

Inheritance diagram for robot.result.model.Keyword:
robot.model.keyword.Keyword robot.result.model.StatusMixin robot.model.body.BodyItem robot.model.modelobject.ModelObject metaclass

Public Member Functions

def __init__ (self, kwname='', libname='', doc='', args=(), assign=(), tags=(), timeout=None, type=BodyItem.KEYWORD, status='FAIL', starttime=None, endtime=None, parent=None, sourcename=None)
 
def body (self, body)
 Child keywords and messages as a :class:~.Body object. More...
 
- Public Member Functions inherited from robot.model.keyword.Keyword
def __bool__ (self)
 
def __init__ (self, name='', doc='', args=(), assign=(), tags=(), timeout=None, type=BodyItem.KEYWORD, parent=None)
 
def __str__ (self)
 
def tags (self, tags)
 Keyword tags as a :class:~.model.tags.Tags object. More...
 
def visit (self, visitor)
 :mod:Visitor interface <robot.model.visitor> entry-point. More...
 
- Public Member Functions inherited from robot.model.modelobject.ModelObject
def __repr__ (self)
 
def config (self, **attributes)
 Configure model object with given attributes. More...
 
def copy (self, **attributes)
 Return shallow copy of this object. More...
 
def deepcopy (self, **attributes)
 Return deep copy of this object. More...
 

Public Attributes

 body
 
 endtime
 
 kwname
 
 libname
 
 message
 
 sourcename
 
 starttime
 
 status
 
- Public Attributes inherited from robot.model.keyword.Keyword
 args
 
 assign
 
 doc
 
 parent
 
 tags
 
 timeout
 
 type
 
- Public Attributes inherited from robot.result.model.StatusMixin
 status
 

Static Public Attributes

 body_class = Body
 
- Static Public Attributes inherited from robot.model.keyword.Keyword
tuple repr_args = ('name', 'args', 'assign')
 
- Static Public Attributes inherited from robot.model.body.BodyItem
string BREAK = 'BREAK'
 
string CONTINUE = 'CONTINUE'
 
string ELSE = 'ELSE'
 
string ELSE_IF = 'ELSE IF'
 
string EXCEPT = 'EXCEPT'
 
string FINALLY = 'FINALLY'
 
string FOR = 'FOR'
 
string IF = 'IF'
 
string IF_ELSE_ROOT = 'IF/ELSE ROOT'
 
string ITERATION = 'ITERATION'
 
string KEYWORD = 'KEYWORD'
 
string MESSAGE = 'MESSAGE'
 
string RETURN = 'RETURN'
 
string SETUP = 'SETUP'
 
string TEARDOWN = 'TEARDOWN'
 
string TRY = 'TRY'
 
string TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
 
 type = None
 
string WHILE = 'WHILE'
 
- Static Public Attributes inherited from robot.model.modelobject.ModelObject
tuple repr_args = ()
 
- Static Public Attributes inherited from robot.result.model.StatusMixin
string FAIL = 'FAIL'
 
string NOT_RUN = 'NOT RUN'
 
string NOT_SET = 'NOT SET'
 
string PASS = 'PASS'
 
string SKIP = 'SKIP'
 

Properties

 children = property
 List of child keywords and messages in creation order. More...
 
 keywords = property
 Deprecated since Robot Framework 4.0. More...
 
 messages = property
 Keyword's messages. More...
 
 name = property
 Keyword name in format libname.kwname. More...
 
- Properties inherited from robot.model.keyword.Keyword
 has_teardown = property
 Check does a keyword have a teardown without creating a teardown object. More...
 
 name = property
 
 teardown = property
 Keyword teardown as a :class:Keyword object. More...
 
- Properties inherited from robot.model.body.BodyItem
 has_setup = property
 
 has_teardown = property
 
 id = property
 Item id in format like s1-t3-k1. More...
 
- Properties inherited from robot.result.model.StatusMixin
 elapsedtime = property
 Total execution time in milliseconds. More...
 
 failed = property
 True when :attr:status is 'FAIL', False otherwise. More...
 
 not_run = property
 True when :attr:status is 'NOT RUN', False otherwise. More...
 
 passed = property
 True when :attr:status is 'PASS', False otherwise. More...
 
 skipped = property
 True when :attr:status is 'SKIP', False otherwise. More...
 

Private Member Functions

def children (self)
 
def keywords (self)
 
def keywords (self, keywords)
 
def messages (self)
 
def name (self)
 
def name (self, name)
 

Static Private Attributes

list __slots__
 

Detailed Description

Represents results of a single keyword.

See the base class for documentation of attributes not documented here.

Definition at line 464 of file model.py.

Constructor & Destructor Documentation

◆ __init__()

def robot.result.model.Keyword.__init__ (   self,
  kwname = '',
  libname = '',
  doc = '',
  args = (),
  assign = (),
  tags = (),
  timeout = None,
  type = BodyItem.KEYWORD,
  status = 'FAIL',
  starttime = None,
  endtime = None,
  parent = None,
  sourcename = None 
)

Definition at line 469 of file model.py.

Member Function Documentation

◆ body()

def robot.result.model.Keyword.body (   self,
  body 
)

Child keywords and messages as a :class:~.Body object.

Definition at line 491 of file model.py.

◆ children()

def robot.result.model.Keyword.children (   self)
private

Definition at line 530 of file model.py.

◆ keywords() [1/2]

def robot.result.model.Keyword.keywords (   self)
private

Definition at line 501 of file model.py.

◆ keywords() [2/2]

def robot.result.model.Keyword.keywords (   self,
  keywords 
)
private

Definition at line 509 of file model.py.

◆ messages()

def robot.result.model.Keyword.messages (   self)
private

Definition at line 520 of file model.py.

◆ name() [1/2]

def robot.result.model.Keyword.name (   self)
private

Reimplemented from robot.model.keyword.Keyword.

Definition at line 546 of file model.py.

◆ name() [2/2]

def robot.result.model.Keyword.name (   self,
  name 
)
private

Reimplemented from robot.model.keyword.Keyword.

Definition at line 553 of file model.py.

Member Data Documentation

◆ __slots__

list robot.result.model.Keyword.__slots__
staticprivate
Initial value:
= ['kwname', 'libname', 'status', 'starttime', 'endtime', 'message',
'sourcename']

Definition at line 466 of file model.py.

◆ body

robot.result.model.Keyword.body

Definition at line 487 of file model.py.

◆ body_class

robot.result.model.Keyword.body_class = Body
static

Definition at line 465 of file model.py.

◆ endtime

robot.result.model.Keyword.endtime

Definition at line 482 of file model.py.

◆ kwname

robot.result.model.Keyword.kwname

Definition at line 474 of file model.py.

◆ libname

robot.result.model.Keyword.libname

Definition at line 476 of file model.py.

◆ message

robot.result.model.Keyword.message

Definition at line 484 of file model.py.

◆ sourcename

robot.result.model.Keyword.sourcename

Definition at line 486 of file model.py.

◆ starttime

robot.result.model.Keyword.starttime

Definition at line 480 of file model.py.

◆ status

robot.result.model.Keyword.status

Definition at line 478 of file model.py.

Property Documentation

◆ children

robot.result.model.Keyword.children = property
static

List of child keywords and messages in creation order.

    Deprecated since Robot Framework 4.0. Use :att:`body` instead.

Definition at line 528 of file model.py.

◆ keywords

robot.result.model.Keyword.keywords = property
static

Deprecated since Robot Framework 4.0.

    Use :attr:`body` or :attr:`teardown` instead.

Definition at line 499 of file model.py.

◆ messages

robot.result.model.Keyword.messages = property
static

Keyword's messages.

    Starting from Robot Framework 4.0 this is a list generated from messages
    in :attr:`body`.

Definition at line 518 of file model.py.

◆ name

robot.result.model.Keyword.name = property
static

Keyword name in format libname.kwname.

    Just ``kwname`` if :attr:`libname` is empty. In practice that is the
    case only with user keywords in the same file as the executed test case
    or test suite.

    Cannot be set directly. Set :attr:`libname` and :attr:`kwname`
    separately instead.

Definition at line 544 of file model.py.


The documentation for this class was generated from the following file: