Class PlaywrightElementValidationsBuilder
java.lang.Object
com.shaft.gui.playwright.validation.PlaywrightElementValidationsBuilder
- All Implemented Interfaces:
ElementAssertions
-
Constructor Summary
ConstructorsConstructorDescriptionPlaywrightElementValidationsBuilder(ValidationEnums.ValidationCategory validationCategory, PlaywrightSession session, com.microsoft.playwright.Locator locator) PlaywrightElementValidationsBuilder(ValidationEnums.ValidationCategory validationCategory, PlaywrightSession session, com.microsoft.playwright.Locator locator, String locatorDescription) -
Method Summary
Modifier and TypeMethodDescriptioncssProperty(String elementCssProperty) doesNotMatchReferenceImage(ValidationEnums.VisualValidationEngine visualValidationEngine) domAttribute(String domAttribute) domProperty(String domProperty) exists()isHidden()matchesAriaSnapshot(String snapshotFileName) Starts an accessible-name-tree regression assertion against the element's baseline aria snapshot.matchesReferenceImage(ValidationEnums.VisualValidationEngine visualValidationEngine) Asserts that the element matches its baseline screenshot.matchesScreenshot(VisualComparisonOptions options) Asserts that the element matches its baseline screenshot, using the given diff-budget/mask options (seeVisualComparisonOptions).text()
-
Constructor Details
-
PlaywrightElementValidationsBuilder
public PlaywrightElementValidationsBuilder(ValidationEnums.ValidationCategory validationCategory, PlaywrightSession session, com.microsoft.playwright.Locator locator) -
PlaywrightElementValidationsBuilder
public PlaywrightElementValidationsBuilder(ValidationEnums.ValidationCategory validationCategory, PlaywrightSession session, com.microsoft.playwright.Locator locator, String locatorDescription)
-
-
Method Details
-
exists
- Specified by:
existsin interfaceElementAssertions
-
doesNotExist
- Specified by:
doesNotExistin interfaceElementAssertions
-
matchesReferenceImage
- Specified by:
matchesReferenceImagein interfaceElementAssertions
-
matchesReferenceImage
public ValidationsExecutor matchesReferenceImage(ValidationEnums.VisualValidationEngine visualValidationEngine) - Specified by:
matchesReferenceImagein interfaceElementAssertions
-
doesNotMatchReferenceImage
- Specified by:
doesNotMatchReferenceImagein interfaceElementAssertions
-
doesNotMatchReferenceImage
public ValidationsExecutor doesNotMatchReferenceImage(ValidationEnums.VisualValidationEngine visualValidationEngine) - Specified by:
doesNotMatchReferenceImagein interfaceElementAssertions
-
attribute
- Specified by:
attributein interfaceElementAssertions
-
domAttribute
- Specified by:
domAttributein interfaceElementAssertions
-
domProperty
- Specified by:
domPropertyin interfaceElementAssertions
-
property
- Specified by:
propertyin interfaceElementAssertions
-
isSelected
- Specified by:
isSelectedin interfaceElementAssertions
-
isChecked
- Specified by:
isCheckedin interfaceElementAssertions
-
isVisible
- Specified by:
isVisiblein interfaceElementAssertions
-
isEnabled
- Specified by:
isEnabledin interfaceElementAssertions
-
isNotSelected
- Specified by:
isNotSelectedin interfaceElementAssertions
-
isNotChecked
- Specified by:
isNotCheckedin interfaceElementAssertions
-
isHidden
- Specified by:
isHiddenin interfaceElementAssertions
-
isDisabled
- Specified by:
isDisabledin interfaceElementAssertions
-
text
- Specified by:
textin interfaceElementAssertions
-
textTrimmed
- Specified by:
textTrimmedin interfaceElementAssertions
-
cssProperty
- Specified by:
cssPropertyin interfaceElementAssertions
-
matchesAriaSnapshot
Description copied from interface:ElementAssertionsStarts an accessible-name-tree regression assertion against the element's baseline aria snapshot.- Specified by:
matchesAriaSnapshotin interfaceElementAssertions- Parameters:
snapshotFileName- the baseline file name (under the configured aria snapshot folder) to compare against or create- Returns:
- a ValidationsExecutor object retained for source compatibility
-
matchesScreenshot
Description copied from interface:ElementAssertionsAsserts that the element matches its baseline screenshot. Executes immediately, like every other assertion.- Specified by:
matchesScreenshotin interfaceElementAssertions- Returns:
- a ValidationsExecutor object to optionally set a custom validation message
-
matchesScreenshot
Description copied from interface:ElementAssertionsAsserts that the element matches its baseline screenshot, using the given diff-budget/mask options (seeVisualComparisonOptions). Executes immediately.- Specified by:
matchesScreenshotin interfaceElementAssertions- Parameters:
options- the visual comparison options (diff budgets, masks), ornullfor defaults- Returns:
- a ValidationsExecutor object to optionally set a custom validation message
-