Skip to content

ScreenshotOptions

Namespace: E2E

public sealed class ScreenshotOptions

Options of ToHaveScreenshotAsync.

Inheritance: object

View source

public IReadOnlyList<Locator>? Mask { get; init; }

Locators painted over before comparing, for content that changes from run to run.

Value: IReadOnlyList<Locator>

View source

public string? MaskColor { get; init; }

Color of the Mask boxes, written #rrggbb. Default #ff00ff.

Value: string

View source

public double? MaxDiffPixelRatio { get; init; }

What share of the pixels may differ, from 0 to 1. Default 0. With MaxDiffPixels also set, the smaller count wins.

Value: double?

View source

public int? MaxDiffPixels { get; init; }

How many pixels may differ. Default 0.

Value: int?

View source

public double? Threshold { get; init; }

How far one pixel’s color may drift and still count as the same, from 0 (exact) to 1. Default 0.2.

Value: double?

View source

public TimeSpan? Timeout { get; init; }

Assertion budget. Defaults to the assertion timeout.

Value: TimeSpan?

View source