import {TakePhotosOfFailures} from '@serenity-js/webdriverio/lib/stage/crew/photographer/strategies'
public class | source

TakePhotosOfFailures

Configures the Photographer to take photos (a.k.a. screenshots) when the Interaction performed by the Actor in the spotlight results in an error.

This strategy works best when you are interested in the screenshots only when a scenario fails.

Extends:

PhotoTakingStrategy → TakePhotosOfFailures

Method Summary

Protected Methods
protected
protected

shouldTakeAPhotoOf(event: DomainEvent): boolean

Inherited Summary

From class PhotoTakingStrategy
public

considerTakingPhoto(event: ActivityStarts | @serenity-js/core/lib/events~ActivityFinished, stage: Stage): void

Takes a photo of the web browser held by the Actor in the spotlight.

Protected Methods

protected photoNameFor(event: InteractionFinished): string source

Params:

NameTypeAttributeDescription
event InteractionFinished

Returns:

string

protected shouldTakeAPhotoOf(event: DomainEvent): boolean source

Params:

NameTypeAttributeDescription
event DomainEvent

Returns:

boolean