Skip to content

When using --prerunmodifier keywords are added two times #483

Open
@gregory83

Description

@gregory83

Hello,

I noticed following issue:
Run docker with --prerunmodifier some_path.suite_visitor.Visitor
In my case the goal is to define capture screen in each test case.

Example:
`
class ScreenRecordingSuite(SuiteVisitor):

    def start_test(self, test):
        inject_keyword(test,"setup", "Start screen recording", append=True)

    def end_test(self, test):
        inject_keyword(test, "teardown", "Stop screen recording", append=True)

`

But my keywords are injected two times.
If I'm using directly robot command then it is added only one time.

I'm not sure if I'm doing something wrong or not. I quickly checked source code and I was not able to find anything.

Expected behavior
Keywords are injected only one times

Robot template
Any test is fine the goal is to verify that keywords are injected properly

Screenshots
image

Please provide any relevant information, such as:

  • Everything run in docker version: ppodgorsek/robot-framework:7.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions