robot.result package

Implements parsing execution results from XML output files.

The main public API of this package consists of the ExecutionResult() factory method, that returns Result objects, and of the ResultVisitor abstract class, that eases further processing the results.

The model objects in the model module can also be considered to be part of the public API, because they can be found inside the Result object. They can also be inspected and modified as part of the normal test execution by pre-Rebot modifiers and listeners.

It is highly recommended to import the public entry-points via the robot.api package like in the example below. In those rare cases where the aforementioned model objects are needed directly, they can be imported from this package.

This package is considered stable.

Example

#!/usr/bin/env python

"""Usage: check_test_times.py seconds inpath [outpath]

Reads test execution result from an output XML file and checks that no test
took longer than given amount of seconds to execute.

Optional `outpath` specifies where to write processed results. If not given,
results are written over the original file.
"""

import sys
from robot.api import ExecutionResult, ResultVisitor


class ExecutionTimeChecker(ResultVisitor):

    def __init__(self, max_seconds):
        self.max_milliseconds = max_seconds * 1000

    def visit_test(self, test):
        if test.status == 'PASS' and test.elapsedtime > self.max_milliseconds:
            test.status = 'FAIL'
            test.message = 'Test execution took too long.'


def check_tests(seconds, inpath, outpath=None):
    result = ExecutionResult(inpath)
    result.visit(ExecutionTimeChecker(float(seconds)))
    result.save(outpath)


if __name__ == '__main__':
    try:
        check_tests(*sys.argv[1:])
    except TypeError:
        print(__doc__)

Submodules

robot.result.configurer module

class robot.result.configurer.SuiteConfigurer(remove_keywords=None, log_level=None, start_time=None, end_time=None, **base_config)[source]

Bases: robot.model.configurer.SuiteConfigurer

Result suite configured.

Calls suite’s remove_keywords() and filter_messages() methods and sets its start and end time based on the given named parameters.

base_config is forwarded to robot.model.SuiteConfigurer that will do further configuration based on them.

visit_suite(suite)[source]

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

add_tags
end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

remove_tags
start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_suite(suite)

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_keyword(kw)

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_test(test)

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

robot.result.executionerrors module

class robot.result.executionerrors.ExecutionErrors(messages=None)[source]

Bases: object

Represents errors occurred during the execution of tests.

An error might be, for example, that importing a library has failed.

id = 'errors'
messages

A list-like object of Message instances.

add(other)[source]
visit(visitor)[source]

robot.result.executionresult module

class robot.result.executionresult.Result(source=None, root_suite=None, errors=None, rpa=None)[source]

Bases: object

Test execution results.

Can be created based on XML output files using the ExecutionResult() factory method. Also returned by the robot.running.TestSuite.run method.

source = None

Path to the XML file where results are read from.

suite = None

Hierarchical execution results as a TestSuite object.

errors = None

Execution errors as an ExecutionErrors object.

statistics

Test execution statistics.

Statistics are an instance of Statistics that is created based on the contained suite and possible configuration.

Statistics are created every time this property is accessed. Saving them to a variable is thus often a good idea to avoid re-creating them unnecessarily:

from robot.api import ExecutionResult

result = ExecutionResult('output.xml')
result.configure(stat_config={'suite_stat_level': 2,
                              'tag_stat_combine': 'tagANDanother'})
stats = result.statistics
print(stats.total.failed)
print(stats.total.passed)
print(stats.tags.combined[0].total)
return_code

Return code (integer) of test execution.

By default returns the number of failed tests (max 250), but can be configured to always return 0.

configure(status_rc=True, suite_config=None, stat_config=None)[source]

Configures the result object and objects it contains.

Parameters:
  • status_rc – If set to False, return_code always returns 0.
  • suite_config – A dictionary of configuration options passed to configure() method of the contained suite.
  • stat_config – A dictionary of configuration options used when creating statistics.
save(path=None)[source]

Save results as a new output XML file.

Parameters:path – Path to save results to. If omitted, overwrites the original file.
visit(visitor)[source]

An entry point to visit the whole result object.

Parameters:visitor – An instance of ResultVisitor.

Visitors can gather information, modify results, etc. See result package for a simple usage example.

Notice that it is also possible to call result.suite.visit if there is no need to visit the contained statistics or errors.

handle_suite_teardown_failures()[source]

Internal usage only.

set_execution_mode(other)[source]

Set execution mode based on other result. Internal usage only.

class robot.result.executionresult.CombinedResult(results=None)[source]

Bases: robot.result.executionresult.Result

Combined results of multiple test executions.

add_result(other)[source]
configure(status_rc=True, suite_config=None, stat_config=None)

Configures the result object and objects it contains.

Parameters:
  • status_rc – If set to False, return_code always returns 0.
  • suite_config – A dictionary of configuration options passed to configure() method of the contained suite.
  • stat_config – A dictionary of configuration options used when creating statistics.
handle_suite_teardown_failures()

Internal usage only.

return_code

Return code (integer) of test execution.

By default returns the number of failed tests (max 250), but can be configured to always return 0.

save(path=None)

Save results as a new output XML file.

Parameters:path – Path to save results to. If omitted, overwrites the original file.
set_execution_mode(other)

Set execution mode based on other result. Internal usage only.

statistics

Test execution statistics.

Statistics are an instance of Statistics that is created based on the contained suite and possible configuration.

Statistics are created every time this property is accessed. Saving them to a variable is thus often a good idea to avoid re-creating them unnecessarily:

from robot.api import ExecutionResult

result = ExecutionResult('output.xml')
result.configure(stat_config={'suite_stat_level': 2,
                              'tag_stat_combine': 'tagANDanother'})
stats = result.statistics
print(stats.total.failed)
print(stats.total.passed)
print(stats.tags.combined[0].total)
visit(visitor)

An entry point to visit the whole result object.

Parameters:visitor – An instance of ResultVisitor.

Visitors can gather information, modify results, etc. See result package for a simple usage example.

Notice that it is also possible to call result.suite.visit if there is no need to visit the contained statistics or errors.

robot.result.flattenkeywordmatcher module

robot.result.flattenkeywordmatcher.validate_flatten_keyword(options)[source]
class robot.result.flattenkeywordmatcher.FlattenByTypeMatcher(flatten)[source]

Bases: object

match(tag)[source]
class robot.result.flattenkeywordmatcher.FlattenByNameMatcher(flatten)[source]

Bases: object

match(kwname, libname=None)[source]
class robot.result.flattenkeywordmatcher.FlattenByTagMatcher(flatten)[source]

Bases: object

match(kwtags)[source]

robot.result.keywordremover module

robot.result.keywordremover.KeywordRemover(how)[source]
class robot.result.keywordremover.AllKeywordsRemover[source]

Bases: robot.result.keywordremover._KeywordRemover

visit_keyword(keyword)[source]

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

visit_for(for_)[source]

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_if_branch(branch)[source]

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_suite(suite)

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_test(test)

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

class robot.result.keywordremover.PassedKeywordRemover[source]

Bases: robot.result.keywordremover._KeywordRemover

start_suite(suite)[source]

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

visit_test(test)[source]

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_keyword(keyword)[source]

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

class robot.result.keywordremover.ByNameKeywordRemover(pattern)[source]

Bases: robot.result.keywordremover._KeywordRemover

start_keyword(kw)[source]

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_suite(suite)

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_keyword(kw)

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_test(test)

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

class robot.result.keywordremover.ByTagKeywordRemover(pattern)[source]

Bases: robot.result.keywordremover._KeywordRemover

start_keyword(kw)[source]

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_suite(suite)

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_keyword(kw)

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_test(test)

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

class robot.result.keywordremover.ForLoopItemsRemover[source]

Bases: robot.result.keywordremover._LoopItemsRemover

start_for(for_)[source]

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_suite(suite)

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_keyword(kw)

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_test(test)

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

class robot.result.keywordremover.WhileLoopItemsRemover[source]

Bases: robot.result.keywordremover._LoopItemsRemover

start_while(while_)[source]

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_suite(suite)

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_keyword(kw)

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_test(test)

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

class robot.result.keywordremover.WaitUntilKeywordSucceedsRemover[source]

Bases: robot.result.keywordremover._KeywordRemover

start_keyword(kw)[source]

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_suite(suite)

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_keyword(kw)

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_test(test)

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

class robot.result.keywordremover.WarningAndErrorFinder[source]

Bases: robot.model.visitor.SuiteVisitor

start_suite(suite)[source]

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_test(test)[source]

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)[source]

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_message(msg)[source]

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_keyword(kw)

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_test(test)

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

class robot.result.keywordremover.RemovalMessage(message)[source]

Bases: object

set_if_removed(kw, len_before)[source]
set(kw, message=None)[source]

robot.result.merger module

class robot.result.merger.Merger(result, rpa=False)[source]

Bases: robot.model.visitor.SuiteVisitor

merge(merged)[source]
start_suite(suite)[source]

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

end_suite(suite)[source]

Called when a suite ends. Default implementation does nothing.

visit_test(test)[source]

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_keyword(kw)

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

robot.result.messagefilter module

class robot.result.messagefilter.MessageFilter(log_level=None)[source]

Bases: robot.model.visitor.SuiteVisitor

start_suite(suite)[source]

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)[source]

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_keyword(kw)

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_test(test)

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

robot.result.model module

Module implementing result related model objects.

During test execution these objects are created internally by various runners. At that time they can inspected and modified by listeners.

When results are parsed from XML output files after execution to be able to create logs and reports, these objects are created by the ExecutionResult() factory method. At that point they can be inspected and modified by pre-Rebot modifiers.

The ExecutionResult() factory method can also be used by custom scripts and tools. In such usage it is often easiest to inspect and modify these objects using the visitor interface.

class robot.result.model.Body(parent=None, items=None)[source]

Bases: robot.model.body.Body

append(item)

S.append(value) – append value to the end of the sequence

break_class

alias of Break

clear() → None -- remove all items from S
continue_class

alias of Continue

count(value) → integer -- return number of occurrences of value
create
create_break(*args, **kwargs)
create_continue(*args, **kwargs)
create_for(*args, **kwargs)
create_if(*args, **kwargs)
create_keyword(*args, **kwargs)
create_message(*args, **kwargs)
create_return(*args, **kwargs)
create_try(*args, **kwargs)
create_while(*args, **kwargs)
extend(items)

S.extend(iterable) – extend sequence by appending elements from the iterable

filter(keywords=None, messages=None, predicate=None)

Filter body items based on type and/or custom predicate.

To include or exclude items based on types, give matching arguments True or False values. For example, to include only keywords, use body.filter(keywords=True) and to exclude messages use body.filter(messages=False). Including and excluding by types at the same time is not supported and filtering my messages is supported only if the Body object actually supports messages.

Custom predicate is a callable getting each body item as an argument that must return True/False depending on should the item be included or not.

Selected items are returned as a list and the original body is not modified.

It was earlier possible to filter also based on FOR and IF types. That support was removed in RF 5.0 because it was not considered useful in general and because adding support for all new control structures would have required extra work. To exclude all control structures, use body.filter(keywords=True, messages=True) and to only include them use body.filter(keywords=False, messages=False)``. For more detailed filtering it is possible to use predicate.

flatten()

Return steps so that IF and TRY structures are flattened.

Basically the IF/ELSE and TRY/EXCEPT root elements are replaced with their branches. This is how they are shown in log files.

for_class

alias of For

if_class

alias of If

index(value[, start[, stop]]) → integer -- return first index of value.

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

insert(index, item)

S.insert(index, value) – insert value before index

keyword_class

alias of Keyword

message_class

alias of Message

pop([index]) → item -- remove and return item at index (default last).

Raise IndexError if list is empty or index is out of range.

classmethod register(item_class)

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove(value)

S.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.

return_class

alias of Return

reverse()

S.reverse() – reverse IN PLACE

sort()
try_class

alias of Try

visit(visitor)
while_class

alias of While

class robot.result.model.Branches(branch_class, parent=None, items=None)[source]

Bases: robot.model.body.Branches

append(item)

S.append(value) – append value to the end of the sequence

branch_class
break_class = None
clear() → None -- remove all items from S
continue_class = None
count(value) → integer -- return number of occurrences of value
create
create_branch(*args, **kwargs)[source]
create_break(*args, **kwargs)
create_continue(*args, **kwargs)
create_for(*args, **kwargs)
create_if(*args, **kwargs)
create_keyword(*args, **kwargs)
create_message(*args, **kwargs)
create_return(*args, **kwargs)
create_try(*args, **kwargs)
create_while(*args, **kwargs)
extend(items)

S.extend(iterable) – extend sequence by appending elements from the iterable

filter(keywords=None, messages=None, predicate=None)

Filter body items based on type and/or custom predicate.

To include or exclude items based on types, give matching arguments True or False values. For example, to include only keywords, use body.filter(keywords=True) and to exclude messages use body.filter(messages=False). Including and excluding by types at the same time is not supported and filtering my messages is supported only if the Body object actually supports messages.

Custom predicate is a callable getting each body item as an argument that must return True/False depending on should the item be included or not.

Selected items are returned as a list and the original body is not modified.

It was earlier possible to filter also based on FOR and IF types. That support was removed in RF 5.0 because it was not considered useful in general and because adding support for all new control structures would have required extra work. To exclude all control structures, use body.filter(keywords=True, messages=True) and to only include them use body.filter(keywords=False, messages=False)``. For more detailed filtering it is possible to use predicate.

flatten()

Return steps so that IF and TRY structures are flattened.

Basically the IF/ELSE and TRY/EXCEPT root elements are replaced with their branches. This is how they are shown in log files.

for_class = None
if_class = None
index(value[, start[, stop]]) → integer -- return first index of value.

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

insert(index, item)

S.insert(index, value) – insert value before index

keyword_class

alias of Keyword

message_class

alias of Message

pop([index]) → item -- remove and return item at index (default last).

Raise IndexError if list is empty or index is out of range.

classmethod register(item_class)

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove(value)

S.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.

return_class = None
reverse()

S.reverse() – reverse IN PLACE

sort()
try_class = None
visit(visitor)
while_class = None
class robot.result.model.Iterations(iteration_class, parent=None, items=None)[source]

Bases: robot.model.body.BaseBody

iteration_class
create_iteration(*args, **kwargs)[source]
append(item)

S.append(value) – append value to the end of the sequence

break_class = None
clear() → None -- remove all items from S
continue_class = None
count(value) → integer -- return number of occurrences of value
create
create_break(*args, **kwargs)
create_continue(*args, **kwargs)
create_for(*args, **kwargs)
create_if(*args, **kwargs)
create_keyword(*args, **kwargs)
create_message(*args, **kwargs)
create_return(*args, **kwargs)
create_try(*args, **kwargs)
create_while(*args, **kwargs)
extend(items)

S.extend(iterable) – extend sequence by appending elements from the iterable

filter(keywords=None, messages=None, predicate=None)

Filter body items based on type and/or custom predicate.

To include or exclude items based on types, give matching arguments True or False values. For example, to include only keywords, use body.filter(keywords=True) and to exclude messages use body.filter(messages=False). Including and excluding by types at the same time is not supported and filtering my messages is supported only if the Body object actually supports messages.

Custom predicate is a callable getting each body item as an argument that must return True/False depending on should the item be included or not.

Selected items are returned as a list and the original body is not modified.

It was earlier possible to filter also based on FOR and IF types. That support was removed in RF 5.0 because it was not considered useful in general and because adding support for all new control structures would have required extra work. To exclude all control structures, use body.filter(keywords=True, messages=True) and to only include them use body.filter(keywords=False, messages=False)``. For more detailed filtering it is possible to use predicate.

flatten()

Return steps so that IF and TRY structures are flattened.

Basically the IF/ELSE and TRY/EXCEPT root elements are replaced with their branches. This is how they are shown in log files.

for_class = None
if_class = None
index(value[, start[, stop]]) → integer -- return first index of value.

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

insert(index, item)

S.insert(index, value) – insert value before index

keyword_class

alias of Keyword

message_class

alias of Message

pop([index]) → item -- remove and return item at index (default last).

Raise IndexError if list is empty or index is out of range.

classmethod register(item_class)

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove(value)

S.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.

return_class = None
reverse()

S.reverse() – reverse IN PLACE

sort()
try_class = None
visit(visitor)
while_class = None
class robot.result.model.Message(message='', level='INFO', html=False, timestamp=None, parent=None)[source]

Bases: robot.model.message.Message

BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
RETURN = 'RETURN'
SETUP = 'SETUP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

has_setup
has_teardown
html
html_message

Returns the message content as HTML.

id

Item id in format like s1-t3-k1.

See TestSuite.id for more information.

level
message
parent
repr_args = ('message', 'level')
timestamp
type = 'MESSAGE'
visit(visitor)[source]

Visitor interface entry-point.

class robot.result.model.StatusMixin[source]

Bases: object

PASS = 'PASS'
FAIL = 'FAIL'
SKIP = 'SKIP'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
elapsedtime

Total execution time in milliseconds.

passed

True when status is ‘PASS’, False otherwise.

failed

True when status is ‘FAIL’, False otherwise.

skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

class robot.result.model.ForIteration(variables=None, status='FAIL', starttime=None, endtime=None, doc='', parent=None)[source]

Bases: robot.model.body.BodyItem, robot.result.model.StatusMixin, robot.result.modeldeprecation.DeprecatedAttributesMixin

Represents one FOR loop iteration.

type = 'ITERATION'
body_class

alias of Body

repr_args = ('variables',)
variables
parent
status
starttime
endtime
doc
body
visit(visitor)[source]
name

Deprecated.

BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FAIL = 'FAIL'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
RETURN = 'RETURN'
SETUP = 'SETUP'
SKIP = 'SKIP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
args

Deprecated.

assign

Deprecated.

config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

elapsedtime

Total execution time in milliseconds.

failed

True when status is ‘FAIL’, False otherwise.

has_setup
has_teardown
id

Item id in format like s1-t3-k1.

See TestSuite.id for more information.

kwname

Deprecated.

libname

Deprecated.

message

Deprecated.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

passed

True when status is ‘PASS’, False otherwise.

skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

tags

Deprecated.

timeout

Deprecated.

class robot.result.model.For(variables=(), flavor='IN', values=(), status='FAIL', starttime=None, endtime=None, doc='', parent=None)[source]

Bases: robot.model.control.For, robot.result.model.StatusMixin, robot.result.modeldeprecation.DeprecatedAttributesMixin

iterations_class

alias of Iterations

iteration_class

alias of ForIteration

status
starttime
endtime
doc
body
name

Deprecated.

BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FAIL = 'FAIL'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
RETURN = 'RETURN'
SETUP = 'SETUP'
SKIP = 'SKIP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
args

Deprecated.

assign

Deprecated.

body_class

alias of robot.model.body.Body

config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

elapsedtime

Total execution time in milliseconds.

failed

True when status is ‘FAIL’, False otherwise.

flavor
has_setup
has_teardown
id

Item id in format like s1-t3-k1.

See TestSuite.id for more information.

keywords

Deprecated since Robot Framework 4.0. Use body instead.

kwname

Deprecated.

libname

Deprecated.

message

Deprecated.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

parent
passed

True when status is ‘PASS’, False otherwise.

repr_args = ('variables', 'flavor', 'values')
skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

tags

Deprecated.

timeout

Deprecated.

type = 'FOR'
values
variables
visit(visitor)[source]
class robot.result.model.WhileIteration(status='FAIL', starttime=None, endtime=None, doc='', parent=None)[source]

Bases: robot.model.body.BodyItem, robot.result.model.StatusMixin, robot.result.modeldeprecation.DeprecatedAttributesMixin

Represents one WHILE loop iteration.

type = 'ITERATION'
body_class

alias of Body

parent
status
starttime
endtime
doc
body
visit(visitor)[source]
name

Deprecated.

BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FAIL = 'FAIL'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
RETURN = 'RETURN'
SETUP = 'SETUP'
SKIP = 'SKIP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
args

Deprecated.

assign

Deprecated.

config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

elapsedtime

Total execution time in milliseconds.

failed

True when status is ‘FAIL’, False otherwise.

has_setup
has_teardown
id

Item id in format like s1-t3-k1.

See TestSuite.id for more information.

kwname

Deprecated.

libname

Deprecated.

message

Deprecated.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

passed

True when status is ‘PASS’, False otherwise.

repr_args = ()
skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

tags

Deprecated.

timeout

Deprecated.

class robot.result.model.While(condition=None, limit=None, parent=None, status='FAIL', starttime=None, endtime=None, doc='')[source]

Bases: robot.model.control.While, robot.result.model.StatusMixin, robot.result.modeldeprecation.DeprecatedAttributesMixin

iterations_class

alias of Iterations

iteration_class

alias of WhileIteration

status
starttime
endtime
doc
body
name

Deprecated.

BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FAIL = 'FAIL'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
RETURN = 'RETURN'
SETUP = 'SETUP'
SKIP = 'SKIP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
args

Deprecated.

assign

Deprecated.

body_class

alias of robot.model.body.Body

condition
config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

elapsedtime

Total execution time in milliseconds.

failed

True when status is ‘FAIL’, False otherwise.

has_setup
has_teardown
id

Item id in format like s1-t3-k1.

See TestSuite.id for more information.

kwname

Deprecated.

libname

Deprecated.

limit
message

Deprecated.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

parent
passed

True when status is ‘PASS’, False otherwise.

repr_args = ('condition', 'limit')
skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

tags

Deprecated.

timeout

Deprecated.

type = 'WHILE'
visit(visitor)[source]
class robot.result.model.IfBranch(type='IF', condition=None, status='FAIL', starttime=None, endtime=None, doc='', parent=None)[source]

Bases: robot.model.control.IfBranch, robot.result.model.StatusMixin, robot.result.modeldeprecation.DeprecatedAttributesMixin

body_class

alias of Body

status
starttime
endtime
doc
name

Deprecated.

BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FAIL = 'FAIL'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
RETURN = 'RETURN'
SETUP = 'SETUP'
SKIP = 'SKIP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
args

Deprecated.

assign

Deprecated.

body
condition
config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

elapsedtime

Total execution time in milliseconds.

failed

True when status is ‘FAIL’, False otherwise.

has_setup
has_teardown
id

Branch id omits IF/ELSE root from the parent id part.

kwname

Deprecated.

libname

Deprecated.

message

Deprecated.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

parent
passed

True when status is ‘PASS’, False otherwise.

repr_args = ('type', 'condition')
skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

tags

Deprecated.

timeout

Deprecated.

type
visit(visitor)[source]
class robot.result.model.If(status='FAIL', starttime=None, endtime=None, doc='', parent=None)[source]

Bases: robot.model.control.If, robot.result.model.StatusMixin, robot.result.modeldeprecation.DeprecatedAttributesMixin

branch_class

alias of IfBranch

branches_class

alias of Branches

status
starttime
endtime
doc
BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FAIL = 'FAIL'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
RETURN = 'RETURN'
SETUP = 'SETUP'
SKIP = 'SKIP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
args

Deprecated.

assign

Deprecated.

body
config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

elapsedtime

Total execution time in milliseconds.

failed

True when status is ‘FAIL’, False otherwise.

has_setup
has_teardown
id

Root IF/ELSE id is always None.

kwname

Deprecated.

libname

Deprecated.

message

Deprecated.

name

Deprecated.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

parent
passed

True when status is ‘PASS’, False otherwise.

repr_args = ()
skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

tags

Deprecated.

timeout

Deprecated.

type = 'IF/ELSE ROOT'
visit(visitor)[source]
class robot.result.model.TryBranch(type='TRY', patterns=(), pattern_type=None, variable=None, status='FAIL', starttime=None, endtime=None, doc='', parent=None)[source]

Bases: robot.model.control.TryBranch, robot.result.model.StatusMixin, robot.result.modeldeprecation.DeprecatedAttributesMixin

body_class

alias of Body

status
starttime
endtime
doc
name

Deprecated.

BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FAIL = 'FAIL'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
RETURN = 'RETURN'
SETUP = 'SETUP'
SKIP = 'SKIP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
args

Deprecated.

assign

Deprecated.

body
config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

elapsedtime

Total execution time in milliseconds.

failed

True when status is ‘FAIL’, False otherwise.

has_setup
has_teardown
id

Branch id omits TRY/EXCEPT root from the parent id part.

kwname

Deprecated.

libname

Deprecated.

message

Deprecated.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

parent
passed

True when status is ‘PASS’, False otherwise.

pattern_type
patterns
repr_args = ('type', 'patterns', 'pattern_type', 'variable')
skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

tags

Deprecated.

timeout

Deprecated.

type
variable
visit(visitor)[source]
class robot.result.model.Try(status='FAIL', starttime=None, endtime=None, doc='', parent=None)[source]

Bases: robot.model.control.Try, robot.result.model.StatusMixin, robot.result.modeldeprecation.DeprecatedAttributesMixin

branch_class

alias of TryBranch

branches_class

alias of Branches

status
starttime
endtime
doc
BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FAIL = 'FAIL'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
RETURN = 'RETURN'
SETUP = 'SETUP'
SKIP = 'SKIP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
args

Deprecated.

assign

Deprecated.

body
config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

elapsedtime

Total execution time in milliseconds.

else_branch
except_branches
failed

True when status is ‘FAIL’, False otherwise.

finally_branch
has_setup
has_teardown
id

Root TRY/EXCEPT id is always None.

kwname

Deprecated.

libname

Deprecated.

message

Deprecated.

name

Deprecated.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

parent
passed

True when status is ‘PASS’, False otherwise.

repr_args = ()
skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

tags

Deprecated.

timeout

Deprecated.

try_branch
type = 'TRY/EXCEPT ROOT'
visit(visitor)[source]
class robot.result.model.Return(values=(), status='FAIL', starttime=None, endtime=None, parent=None)[source]

Bases: robot.model.control.Return, robot.result.model.StatusMixin, robot.result.modeldeprecation.DeprecatedAttributesMixin

body_class

alias of Body

status
starttime
endtime
body

Child keywords and messages as a Body object.

Typically empty. Only contains something if running RETURN has failed due to a syntax error or listeners have logged messages or executed keywords.

args

Deprecated.

doc

Deprecated.

BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FAIL = 'FAIL'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
RETURN = 'RETURN'
SETUP = 'SETUP'
SKIP = 'SKIP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
assign

Deprecated.

config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

elapsedtime

Total execution time in milliseconds.

failed

True when status is ‘FAIL’, False otherwise.

has_setup
has_teardown
id

Item id in format like s1-t3-k1.

See TestSuite.id for more information.

kwname

Deprecated.

libname

Deprecated.

message

Deprecated.

name

Deprecated.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

parent
passed

True when status is ‘PASS’, False otherwise.

repr_args = ('values',)
skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

tags

Deprecated.

timeout

Deprecated.

type = 'RETURN'
values
visit(visitor)[source]
class robot.result.model.Continue(status='FAIL', starttime=None, endtime=None, parent=None)[source]

Bases: robot.model.control.Continue, robot.result.model.StatusMixin, robot.result.modeldeprecation.DeprecatedAttributesMixin

body_class

alias of Body

status
starttime
endtime
body

Child keywords and messages as a Body object.

Typically empty. Only contains something if running CONTINUE has failed due to a syntax error or listeners have logged messages or executed keywords.

args

Deprecated.

doc

Deprecated.

BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FAIL = 'FAIL'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
RETURN = 'RETURN'
SETUP = 'SETUP'
SKIP = 'SKIP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
assign

Deprecated.

config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

elapsedtime

Total execution time in milliseconds.

failed

True when status is ‘FAIL’, False otherwise.

has_setup
has_teardown
id

Item id in format like s1-t3-k1.

See TestSuite.id for more information.

kwname

Deprecated.

libname

Deprecated.

message

Deprecated.

name

Deprecated.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

parent
passed

True when status is ‘PASS’, False otherwise.

repr_args = ()
skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

tags

Deprecated.

timeout

Deprecated.

type = 'CONTINUE'
visit(visitor)[source]
class robot.result.model.Break(status='FAIL', starttime=None, endtime=None, parent=None)[source]

Bases: robot.model.control.Break, robot.result.model.StatusMixin, robot.result.modeldeprecation.DeprecatedAttributesMixin

body_class

alias of Body

status
starttime
endtime
body

Child keywords and messages as a Body object.

Typically empty. Only contains something if running BREAK has failed due to a syntax error or listeners have logged messages or executed keywords.

args

Deprecated.

doc

Deprecated.

BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FAIL = 'FAIL'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
RETURN = 'RETURN'
SETUP = 'SETUP'
SKIP = 'SKIP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
assign

Deprecated.

config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

elapsedtime

Total execution time in milliseconds.

failed

True when status is ‘FAIL’, False otherwise.

has_setup
has_teardown
id

Item id in format like s1-t3-k1.

See TestSuite.id for more information.

kwname

Deprecated.

libname

Deprecated.

message

Deprecated.

name

Deprecated.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

parent
passed

True when status is ‘PASS’, False otherwise.

repr_args = ()
skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

tags

Deprecated.

timeout

Deprecated.

type = 'BREAK'
visit(visitor)[source]
class robot.result.model.Keyword(kwname='', libname='', doc='', args=(), assign=(), tags=(), timeout=None, type='KEYWORD', status='FAIL', starttime=None, endtime=None, parent=None, sourcename=None)[source]

Bases: robot.model.keyword.Keyword, robot.result.model.StatusMixin

Represents results of a single keyword.

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

body_class

alias of Body

kwname

Name of the keyword without library or resource name.

libname

Name of the library or resource containing this keyword.

status

Execution status as a string. PASS, FAIL, SKIP or NOT RUN.

starttime

Keyword execution start time in format %Y%m%d %H:%M:%S.%f.

endtime

Keyword execution end time in format %Y%m%d %H:%M:%S.%f.

message

Keyword status message. Used only if suite teardowns fails.

sourcename

Original name of keyword with embedded arguments.

body

Child keywords and messages as a Body object.

keywords

Deprecated since Robot Framework 4.0.

Use body or teardown instead.

messages

Keyword’s messages.

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

children

List of child keywords and messages in creation order.

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

name

Keyword name in format libname.kwname.

Just kwname if 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 libname and kwname separately instead.

BREAK = 'BREAK'
CONTINUE = 'CONTINUE'
ELSE = 'ELSE'
ELSE_IF = 'ELSE IF'
EXCEPT = 'EXCEPT'
FAIL = 'FAIL'
FINALLY = 'FINALLY'
FOR = 'FOR'
IF = 'IF'
IF_ELSE_ROOT = 'IF/ELSE ROOT'
ITERATION = 'ITERATION'
KEYWORD = 'KEYWORD'
MESSAGE = 'MESSAGE'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
RETURN = 'RETURN'
SETUP = 'SETUP'
SKIP = 'SKIP'
TEARDOWN = 'TEARDOWN'
TRY = 'TRY'
TRY_EXCEPT_ROOT = 'TRY/EXCEPT ROOT'
WHILE = 'WHILE'
args
assign
config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

doc
elapsedtime

Total execution time in milliseconds.

failed

True when status is ‘FAIL’, False otherwise.

has_setup
has_teardown

Check does a keyword have a teardown without creating a teardown object.

A difference between using if kw.has_teardown: and if kw.teardown: is that accessing the teardown attribute creates a Keyword object representing a teardown even when the keyword actually does not have one. This typically does not matter, but with bigger suite structures having lot of keywords it can have a considerable effect on memory usage.

New in Robot Framework 4.1.2.

id

Item id in format like s1-t3-k1.

See TestSuite.id for more information.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

parent
passed

True when status is ‘PASS’, False otherwise.

repr_args = ('name', 'args', 'assign')
skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

tags

Keyword tags as a Tags object.

teardown

Keyword teardown as a Keyword object.

Teardown can be modified by setting attributes directly:

keyword.teardown.name = 'Example'
keyword.teardown.args = ('First', 'Second')

Alternatively the config() method can be used to set multiple attributes in one call:

keyword.teardown.config(name='Example', args=('First', 'Second'))

The easiest way to reset the whole teardown is setting it to None. It will automatically recreate the underlying Keyword object:

keyword.teardown = None

This attribute is a Keyword object also when a keyword has no teardown but in that case its truth value is False. If there is a need to just check does a keyword have a teardown, using the has_teardown attribute avoids creating the Keyword object and is thus more memory efficient.

New in Robot Framework 4.0. Earlier teardown was accessed like keyword.keywords.teardown. has_teardown is new in Robot Framework 4.1.2.

timeout
type
visit(visitor)[source]

Visitor interface entry-point.

class robot.result.model.TestCase(name='', doc='', tags=None, timeout=None, lineno=None, status='FAIL', message='', starttime=None, endtime=None, parent=None)[source]

Bases: robot.model.testcase.TestCase, robot.result.model.StatusMixin

Represents results of a single test case.

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

body_class

alias of Body

fixture_class

alias of Keyword

status

Status as a string PASS or FAIL. See also passed.

message

Test message. Typically a failure message but can be set also when test passes.

starttime

Test case execution start time in format %Y%m%d %H:%M:%S.%f.

endtime

Test case execution end time in format %Y%m%d %H:%M:%S.%f.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

critical
FAIL = 'FAIL'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
SKIP = 'SKIP'
body

Test body as a Body object.

config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

doc
elapsedtime

Total execution time in milliseconds.

failed

True when status is ‘FAIL’, False otherwise.

has_setup

Check does a suite have a setup without creating a setup object.

A difference between using if test.has_setup: and if test.setup: is that accessing the setup attribute creates a Keyword object representing the setup even when the test actually does not have one. This typically does not matter, but with bigger suite structures containing a huge about of tests it can have an effect on memory usage.

New in Robot Framework 5.0.

has_teardown

Check does a test have a teardown without creating a teardown object.

See has_setup for more information.

New in Robot Framework 5.0.

id

Test case id in format like s1-t3.

See TestSuite.id for more information.

keywords

Deprecated since Robot Framework 4.0

Use body, setup or teardown instead.

lineno
longname

Test name prefixed with the long name of the parent suite.

name
parent
passed

True when status is ‘PASS’, False otherwise.

repr_args = ('name',)
setup

Test setup as a Keyword object.

This attribute is a Keyword object also when a test has no setup but in that case its truth value is False.

Setup can be modified by setting attributes directly:

test.setup.name = 'Example'
test.setup.args = ('First', 'Second')

Alternatively the config() method can be used to set multiple attributes in one call:

test.setup.config(name='Example', args=('First', 'Second'))

The easiest way to reset the whole setup is setting it to None. It will automatically recreate the underlying Keyword object:

test.setup = None

New in Robot Framework 4.0. Earlier setup was accessed like test.keywords.setup.

skipped

True when status is ‘SKIP’, False otherwise.

Setting to False value is ambiguous and raises an exception.

source
tags

Test tags as a Tags object.

teardown

Test teardown as a Keyword object.

See setup for more information.

timeout
visit(visitor)[source]

Visitor interface entry-point.

class robot.result.model.TestSuite(name='', doc='', metadata=None, source=None, message='', starttime=None, endtime=None, rpa=False, parent=None)[source]

Bases: robot.model.testsuite.TestSuite, robot.result.model.StatusMixin

Represents results of a single test suite.

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

test_class

alias of TestCase

fixture_class

alias of Keyword

message

Possible suite setup or teardown error message.

starttime

Suite execution start time in format %Y%m%d %H:%M:%S.%f.

endtime

Suite execution end time in format %Y%m%d %H:%M:%S.%f.

passed

True if no test has failed but some have passed, False otherwise.

failed

True if any test has failed, False otherwise.

skipped

True if there are no passed or failed tests, False otherwise.

FAIL = 'FAIL'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'
PASS = 'PASS'
SKIP = 'SKIP'
config(**attributes)

Configure model object with given attributes.

obj.config(name='Example', doc='Something') is equivalent to setting obj.name = 'Example' and obj.doc = 'Something'.

New in Robot Framework 4.0.

copy(**attributes)

Return shallow copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.copy(name='New name').

See also deepcopy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

deepcopy(**attributes)

Return deep copy of this object.

Parameters:attributes – Attributes to be set for the returned copy automatically. For example, test.deepcopy(name='New name').

See also copy(). The difference between these two is the same as with the standard copy.copy and copy.deepcopy functions that these methods also use internally.

doc
filter(included_suites=None, included_tests=None, included_tags=None, excluded_tags=None)[source]

Select test cases and remove others from this suite.

Parameters have the same semantics as --suite, --test, --include, and --exclude command line options. All of them can be given as a list of strings, or when selecting only one, as a single string.

Child suites that contain no tests after filtering are automatically removed.

Example:

suite.filter(included_tests=['Test 1', '* Example'],
             included_tags='priority-1')
has_setup

Check does a suite have a setup without creating a setup object.

A difference between using if suite.has_setup: and if suite.setup: is that accessing the setup attribute creates a Keyword object representing the setup even when the suite actually does not have one. This typically does not matter, but with bigger suite structures containing a huge about of suites it can have some effect on memory usage.

New in Robot Framework 5.0.

has_teardown

Check does a suite have a teardown without creating a teardown object.

See has_setup for more information.

New in Robot Framework 5.0.

has_tests
id

An automatically generated unique id.

The root suite has id s1, its child suites have ids s1-s1, s1-s2, …, their child suites get ids s1-s1-s1, s1-s1-s2, …, s1-s2-s1, …, and so on.

The first test in a suite has an id like s1-t1, the second has an id s1-t2, and so on. Similarly keywords in suites (setup/teardown) and in tests get ids like s1-k1, s1-t1-k1, and s1-s4-t2-k5.

keywords

Deprecated since Robot Framework 4.0

Use setup or teardown instead.

longname

Suite name prefixed with the long name of the parent suite.

metadata

Free test suite metadata as a dictionary.

name

Test suite name. If not set, constructed from child suite names.

not_run

True when status is ‘NOT RUN’, False otherwise.

Setting to False value is ambiguous and raises an exception.

parent
remove_empty_suites(preserve_direct_children=False)[source]

Removes all child suites not containing any tests, recursively.

repr_args = ('name',)
rpa
set_tags(add=None, remove=None, persist=False)[source]

Add and/or remove specified tags to the tests in this suite.

Parameters:
  • add – Tags to add as a list or, if adding only one, as a single string.
  • remove – Tags to remove as a list or as a single string. Can be given as patterns where * and ? work as wildcards.
  • persist – Add/remove specified tags also to new tests added to this suite in the future.
setup

Suite setup as a Keyword object.

This attribute is a Keyword object also when a suite has no setup but in that case its truth value is False.

Setup can be modified by setting attributes directly:

suite.setup.name = 'Example'
suite.setup.args = ('First', 'Second')

Alternatively the config() method can be used to set multiple attributes in one call:

suite.setup.config(name='Example', args=('First', 'Second'))

The easiest way to reset the whole setup is setting it to None. It will automatically recreate the underlying Keyword object:

suite.setup = None

New in Robot Framework 4.0. Earlier setup was accessed like suite.keywords.setup.

source
suites

Child suites as a TestSuites object.

teardown

Suite teardown as a Keyword object.

See setup for more information.

test_count

Number of the tests in this suite, recursively.

tests

Tests as a TestCases object.

visit(visitor)[source]

Visitor interface entry-point.

status

‘PASS’, ‘FAIL’ or ‘SKIP’ depending on test statuses.

  • If any test has failed, status is ‘FAIL’.
  • If no test has failed but at least some test has passed, status is ‘PASS’.
  • If there are no failed or passed tests, status is ‘SKIP’. This covers both the case when all tests have been skipped and when there are no tests.
statistics

Suite statistics as a TotalStatistics object.

Recreated every time this property is accessed, so saving the results to a variable and inspecting it is often a good idea:

stats = suite.statistics
print(stats.failed)
print(stats.total)
print(stats.message)
full_message

Combination of message and stat_message.

stat_message

String representation of the statistics.

elapsedtime

Total execution time in milliseconds.

remove_keywords(how)[source]

Remove keywords based on the given condition.

Parameters:how – What approach to use when removing keywords. Either ALL, PASSED, FOR, WUKS, or NAME:<pattern>.

For more information about the possible values see the documentation of the --removekeywords command line option.

filter_messages(log_level='TRACE')[source]

Remove log messages below the specified log_level.

configure(**options)[source]

A shortcut to configure a suite using one method call.

Can only be used with the root test suite.

Parameters:options – Passed to SuiteConfigurer that will then set suite attributes, call filter(), etc. as needed.

Example:

suite.configure(remove_keywords='PASSED',
                doc='Smoke test results.')

Not to be confused with config() method that suites, tests, and keywords have to make it possible to set multiple attributes in one call.

handle_suite_teardown_failures()[source]

Internal usage only.

suite_teardown_failed(error)[source]

Internal usage only.

suite_teardown_skipped(message)[source]

Internal usage only.

robot.result.modeldeprecation module

robot.result.modeldeprecation.deprecated(method)[source]
class robot.result.modeldeprecation.DeprecatedAttributesMixin[source]

Bases: object

name

Deprecated.

kwname

Deprecated.

libname

Deprecated.

args

Deprecated.

assign

Deprecated.

tags

Deprecated.

timeout

Deprecated.

message

Deprecated.

robot.result.resultbuilder module

robot.result.resultbuilder.ExecutionResult(*sources, **options)[source]

Factory method to constructs Result objects.

Parameters:
  • sources – XML source(s) containing execution results. Can be specified as paths, opened file objects, or strings/bytes containing XML directly. Support for bytes is new in RF 3.2.
  • options – Configuration options. Using merge=True causes multiple results to be combined so that tests in the latter results replace the ones in the original. Setting rpa either to True (RPA mode) or False (test automation) sets execution mode explicitly. By default it is got from processed output files and conflicting modes cause an error. Other options are passed directly to the ExecutionResultBuilder object used internally.
Returns:

Result instance.

Should be imported by external code via the robot.api package. See the robot.result package for a usage example.

class robot.result.resultbuilder.ExecutionResultBuilder(source, include_keywords=True, flattened_keywords=None)[source]

Bases: object

Builds Result objects based on output files.

Instead of using this builder directly, it is recommended to use the ExecutionResult() factory method.

Parameters:
  • source – Path to the XML output file to build Result objects from.
  • include_keywords – Boolean controlling whether to include keyword information in the result or not. Keywords are not needed when generating only report. Although the the option name has word “keyword”, it controls also including FOR and IF structures.
  • flatten_keywords – List of patterns controlling what keywords to flatten. See the documentation of --flattenkeywords option for more details.
build(result)[source]
class robot.result.resultbuilder.RemoveKeywords[source]

Bases: robot.model.visitor.SuiteVisitor

start_suite(suite)[source]

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

visit_test(test)[source]

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_keyword(kw)

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

robot.result.suiteteardownfailed module

class robot.result.suiteteardownfailed.SuiteTeardownFailureHandler[source]

Bases: robot.model.visitor.SuiteVisitor

end_suite(suite)[source]

Called when a suite ends. Default implementation does nothing.

visit_test(test)[source]

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_keyword(keyword)[source]

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_suite(suite)

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

class robot.result.suiteteardownfailed.SuiteTeardownFailed(message, skipped=False)[source]

Bases: robot.model.visitor.SuiteVisitor

visit_test(test)[source]

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_keyword(keyword)[source]

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_suite(suite)

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

robot.result.visitor module

Visitors can be used to easily traverse result structures.

This module contains ResultVisitor for traversing the whole Result object. It extends SuiteVisitor that contains visiting logic for the test suite structure.

class robot.result.visitor.ResultVisitor[source]

Bases: robot.model.visitor.SuiteVisitor

Abstract class to conveniently travel Result objects.

A visitor implementation can be given to the visit() method of a result object. This will cause the result object to be traversed and the visitor’s visit_x(), start_x(), and end_x() methods to be called for each suite, test, keyword and message, as well as for errors, statistics, and other information in the result object. See methods below for a full list of available visitor methods.

See the result package level documentation for more information about handling results and a concrete visitor example. For more information about the visitor algorithm see documentation in robot.model.visitor module.

visit_result(result)[source]
start_result(result)[source]
end_result(result)[source]
visit_statistics(stats)[source]
start_statistics(stats)[source]
end_statistics(stats)[source]
visit_total_statistics(stats)[source]
start_total_statistics(stats)[source]
end_total_statistics(stats)[source]
visit_tag_statistics(stats)[source]
start_tag_statistics(stats)[source]
end_tag_statistics(stats)[source]
visit_suite_statistics(stats)[source]
start_suite_statistics(stats)[source]
end_suite_statistics(suite_stats)[source]
visit_stat(stat)[source]
start_stat(stat)[source]
end_stat(stat)[source]
visit_errors(errors)[source]
start_errors(errors)[source]
end_errors(errors)[source]
end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls