Class PlaywrightVisualValidationsBuilder
java.lang.Object
com.shaft.validation.internal.VisualValidationsBuilder
com.shaft.gui.playwright.validation.PlaywrightVisualValidationsBuilder
Playwright variant of
VisualValidationsBuilder: adds a Playwright Locator-based
mask(...) overload and routes perform() through PlaywrightValidationsExecutor
instead of the Selenium-oriented base executor.-
Method Summary
Modifier and TypeMethodDescriptionmask(com.microsoft.playwright.Locator... masks) Excludes the region(s) covered by the given Playwright locators from the pixel comparison.maxDiffPixelRatio(double maxDiffPixelRatio) Caps the ratio of differing pixels (0.0-1.0) allowed for the comparison to still pass.maxDiffPixels(int maxDiffPixels) Caps the number of differing pixels allowed for the comparison to still pass.perform()Executes the visual-regression comparison (or saves a new baseline on first run / when-Dshaft.updateSnapshots=trueis set).Methods inherited from class VisualValidationsBuilder
applyOptions, mask
-
Method Details
-
maxDiffPixels
Description copied from class:VisualValidationsBuilderCaps the number of differing pixels allowed for the comparison to still pass.- Overrides:
maxDiffPixelsin classVisualValidationsBuilder- Parameters:
maxDiffPixels- maximum allowed differing pixel count- Returns:
- this builder, to continue chaining options
-
maxDiffPixelRatio
Description copied from class:VisualValidationsBuilderCaps the ratio of differing pixels (0.0-1.0) allowed for the comparison to still pass.- Overrides:
maxDiffPixelRatioin classVisualValidationsBuilder- Parameters:
maxDiffPixelRatio- maximum allowed differing pixel ratio- Returns:
- this builder, to continue chaining options
-
mask
Excludes the region(s) covered by the given Playwright locators from the pixel comparison.- Parameters:
masks- Playwright locators of elements whose bounding boxes should be excluded from the diff- Returns:
- this builder, to continue chaining options
-
perform
Description copied from class:VisualValidationsBuilderExecutes the visual-regression comparison (or saves a new baseline on first run / when-Dshaft.updateSnapshots=trueis set).- Overrides:
performin classVisualValidationsBuilder- Returns:
- a ValidationsExecutor object retained for source compatibility
-