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:
- an interaction results in a failure,
- after any interaction takes place,
- or before and after any interaction.
Installation and usage​
To learn more about the Photographer
, please consult:
- installation instructions in
@serenity-js/web
documentation, - configuration examples in
Photographer
API docs.
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
.