Skip to content

Make screenshot storage more explicit #82

@simonmeggle

Description

@simonmeggle

Hi,
the argument save_to_disk is currently implying that you do not want to embed the file into the HTML log.
Imho, it is suboptimal to control two different things with one argument. It should be configurable independently.

Concrete use case is e2e monitoring with Robot Framework/Robotmk and Checkmk. The HTML log gets transferred to the Checkmk server, where it gets stored on file system and linked in the WUI. The embedded screenshots are really helpful here.
But in addition to embedding there is still a strong need to keep the screenshot files on the test client itself:
Sometimes the SUT shows a fatal error in the interface, which the development team wants to track down in the server logs.
If we had the screenshots all in one directory on the client, we could simply sort them by time and browse through them - the timestamp of this error could be easily determined.
Currently, I would have to open each individual HTML log file, expand the nodes, and see if the error image I'm looking for is in there.

My proposal is to add embed as optional parameter:

# only link in log (store = False, embed=False) 
Take Screenshot
# link in log, store on disk
Take Screenshot  save_to_disk=True
# embed in log, store on disk
Take Screenshot  save_to_disk=True  embed=True

Before I create a PR, what is your opinion about this?

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