Skip to main content

Photographer

Photographer, available as part of the @serenity-js/web module, watches as actors perform their interactions and automatically takes screenshots when the desired conditions are met.

Photographer can be configured to take screenshots when:

Installation and usage​

To learn more about the Photographer, please consult:

You might also want to explore Serenity/JS example projects on GitHub.

Integration​

Photographer listens to InteractionStarts and InteractionFinished domain events and reacts to them based on the configured PhototakingStrategy.

Photographer takes a screenshot of the browser window used by the actor in the spotlight and emits ArtifactGenerated events containing the screenshot, which can be persisted to disk by ArtifactArchiver and included in Serenity BDD reports by SerenityBDDReporter.