ScreenshotOptions
Namespace: E2E
public sealed class ScreenshotOptionsOptions of ToHaveScreenshotAsync.
Inheritance: object
Properties
Section titled “Properties”public IReadOnlyList<Locator>? Mask { get; init; }Locators painted over before comparing, for content that changes from run to run.
Value: IReadOnlyList<Locator>
MaskColor
Section titled “MaskColor”public string? MaskColor { get; init; }Color of the Mask boxes, written #rrggbb. Default #ff00ff.
Value: string
MaxDiffPixelRatio
Section titled “MaxDiffPixelRatio”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?
MaxDiffPixels
Section titled “MaxDiffPixels”public int? MaxDiffPixels { get; init; }How many pixels may differ. Default 0.
Value: int?
Threshold
Section titled “Threshold”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?
Timeout
Section titled “Timeout”public TimeSpan? Timeout { get; init; }Assertion budget. Defaults to the assertion timeout.
Value: TimeSpan?