robot.output.console package

robot.output.console.ConsoleOutput(type='verbose', width=78, colors='AUTO', markers='AUTO', stdout=None, stderr=None)[source]

Submodules

robot.output.console.dotted module

class robot.output.console.dotted.DottedOutput(width=78, colors='AUTO', stdout=None, stderr=None)[source]

Bases: object

start_suite(suite)[source]
end_test(test)[source]
end_suite(suite)[source]
message(msg)[source]
output_file(name, path)[source]
class robot.output.console.dotted.StatusReporter(stream, width)[source]

Bases: robot.model.visitor.SuiteVisitor

report(suite)[source]
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: BodyItem)

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_: Break)

Called when a BREAK element ends.

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

end_continue(continue_: Continue)

Called when a CONTINUE element ends.

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

end_error(error: Error)

Called when a ERROR element ends.

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

end_for(for_: For)

Called when a FOR loop ends.

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

end_for_iteration(iteration: ForIteration)

Called when a FOR loop iteration ends.

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

end_if(if_: If)

Called when an IF/ELSE structure ends.

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

end_if_branch(branch: IfBranch)

Called when an IF/ELSE branch ends.

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

end_keyword(keyword: Keyword)

Called when a keyword ends.

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

end_message(message: Message)

Called when a message ends.

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

end_return(return_: Return)

Called when a RETURN element ends.

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

end_suite(suite: TestSuite)

Called when a suite ends. Default implementation does nothing.

end_test(test: TestCase)

Called when a test ends. Default implementation does nothing.

end_try(try_: Try)

Called when a TRY/EXCEPT structure ends.

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

end_try_branch(branch: TryBranch)

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

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

end_while(while_: While)

Called when a WHILE loop ends.

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

end_while_iteration(iteration: WhileIteration)

Called when a WHILE loop iteration ends.

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

start_body_item(item: BodyItem) → bool|None

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_: Break) → bool|None

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_: Continue) → bool|None

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_error(error: Error) → bool|None

Called when a ERROR element starts.

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

Can return explicit False to stop visiting.

start_for(for_: For) → bool|None

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: ForIteration) → bool|None

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_: If) → bool|None

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: IfBranch) → bool|None

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: Keyword) → bool|None

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(message: Message) → bool|None

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_: Return) → bool|None

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: TestSuite) → bool|None

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_test(test: TestCase) → bool|None

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_: Try) → bool|None

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: TryBranch) → bool|None

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_: While) → bool|None

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: WhileIteration) → bool|None

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_: Break)

Visits BREAK elements.

visit_continue(continue_: Continue)

Visits CONTINUE elements.

visit_error(error: Error)

Visits body items resulting from invalid syntax.

Examples include syntax like END or ELSE in wrong place and invalid setting like [Invalid].

visit_for(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: ForIteration)

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_: 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 they are visited separately 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: IfBranch)

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(keyword: Keyword)

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(message: Message)

Implements visiting messages.

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

visit_return(return_: Return)

Visits a RETURN elements.

visit_suite(suite: TestSuite)

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_: 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: TryBranch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(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: WhileIteration)

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.output.console.highlighting module

class robot.output.console.highlighting.HighlightingStream(stream, colors='AUTO')[source]

Bases: object

write(text, flush=True)[source]
flush()[source]
highlight(text, status=None, flush=True)[source]
error(message, level)[source]
robot.output.console.highlighting.Highlighter(stream)[source]
class robot.output.console.highlighting.AnsiHighlighter(stream)[source]

Bases: object

green()[source]
red()[source]
yellow()[source]
reset()[source]
class robot.output.console.highlighting.NoHighlighting(stream)[source]

Bases: robot.output.console.highlighting.AnsiHighlighter

green()
red()
reset()
yellow()
class robot.output.console.highlighting.DosHighlighter(stream)[source]

Bases: object

green()[source]
red()[source]
yellow()[source]
reset()[source]

robot.output.console.quiet module

class robot.output.console.quiet.QuietOutput(colors='AUTO', stderr=None)[source]

Bases: object

message(msg)[source]
class robot.output.console.quiet.NoOutput[source]

Bases: object

robot.output.console.verbose module

class robot.output.console.verbose.VerboseOutput(width=78, colors='AUTO', markers='AUTO', stdout=None, stderr=None)[source]

Bases: object

start_suite(suite)[source]
end_suite(suite)[source]
start_test(test)[source]
end_test(test)[source]
start_keyword(kw)[source]
end_keyword(kw)[source]
message(msg)[source]
output_file(name, path)[source]
class robot.output.console.verbose.VerboseWriter(width=78, colors='AUTO', markers='AUTO', stdout=None, stderr=None)[source]

Bases: object

info(name, doc, start_suite=False)[source]
suite_separator()[source]
test_separator()[source]
status(status, clear=False)[source]
message(message)[source]
keyword_marker(status)[source]
error(message, level, clear=False)[source]
output(name, path)[source]
class robot.output.console.verbose.KeywordMarker(highlighter, markers)[source]

Bases: object

mark(status)[source]
reset_count()[source]