ppodgorsek / docker-robot-framework

Robot Framework in Docker
https://cloud.docker.com/repository/docker/ppodgorsek/robot-framework
MIT License
333 stars 235 forks source link

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

Open gregory83 opened 3 months ago

gregory83 commented 3 months ago

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: