reportportal / agent-Python-RobotFramework

Robot Framework integration for Report Portal
Apache License 2.0
59 stars 33 forks source link

Any Option to Enable Screenshot along with screenshots when we use command line robotframework_reportportal.listener #168

Closed arunkumar832 closed 1 year ago

arunkumar832 commented 1 year ago

We have integrated robotframework with reportportal using --listener robotframework.reportportal.listener and some variables to it, but there is no option to enable screenshots when we use command line listener, to do we need to write custom code. which is also difficult to code, since when we use command line listener we need to register object created for listener and then re-use the object in custom code to publish screenshot at run time.

If there is a inbuilt variable which embeds the screenshot that is added using robotframework logger like logger.info('<img src="path/to/image"/>'), will be helpful and which avoids user code maintenance.

HardNorth commented 1 year ago

No, there is no such option. SeleniumLibrary is a custom library for Robot Framework and it's strictly designed to write robot report file and nothing else. So there is no nice way to do this.

arunkumar832 commented 1 year ago

@HardNorth, then can you suggest a way to implement this? Because for us this is important feature

HardNorth commented 1 year ago

@arunkumar832 take a look on our example: https://github.com/reportportal/examples-python/blob/master/robotframework/robot/screenshot_as_file.robot