Interface ElementAssertions
- All Known Implementing Classes:
PlaywrightElementValidationsBuilder, WebDriverElementValidationsBuilder
public interface ElementAssertions
Public contract for element-level hard/soft validation starters.
-
Method Summary
Modifier and TypeMethodDescriptioncssProperty(String elementCssProperty) doesNotMatchReferenceImage(ValidationEnums.VisualValidationEngine visualValidationEngine) domAttribute(String domAttribute) domProperty(String domProperty) exists()isHidden()default ValidationsExecutormatchesAriaSnapshot(String snapshotFileName) Starts an accessible-name-tree regression assertion against the element's baseline aria snapshot.matchesReferenceImage(ValidationEnums.VisualValidationEngine visualValidationEngine) default ValidationsExecutorAsserts that the element matches its baseline screenshot.default ValidationsExecutormatchesScreenshot(VisualComparisonOptions options) Asserts that the element matches its baseline screenshot, using the given diff-budget/mask options (seeVisualComparisonOptions).text()
-
Method Details
-
exists
ValidationsExecutor exists() -
doesNotExist
ValidationsExecutor doesNotExist() -
matchesReferenceImage
ValidationsExecutor matchesReferenceImage() -
matchesReferenceImage
ValidationsExecutor matchesReferenceImage(ValidationEnums.VisualValidationEngine visualValidationEngine) -
doesNotMatchReferenceImage
ValidationsExecutor doesNotMatchReferenceImage() -
doesNotMatchReferenceImage
ValidationsExecutor doesNotMatchReferenceImage(ValidationEnums.VisualValidationEngine visualValidationEngine) -
attribute
-
domAttribute
-
domProperty
-
property
-
isSelected
ValidationsExecutor isSelected() -
isChecked
ValidationsExecutor isChecked() -
isVisible
ValidationsExecutor isVisible() -
isEnabled
ValidationsExecutor isEnabled() -
isNotSelected
ValidationsExecutor isNotSelected() -
isNotChecked
ValidationsExecutor isNotChecked() -
isHidden
ValidationsExecutor isHidden() -
isDisabled
ValidationsExecutor isDisabled() -
text
NativeValidationsBuilder text() -
textTrimmed
NativeValidationsBuilder textTrimmed() -
cssProperty
-
matchesScreenshot
Asserts that the element matches its baseline screenshot. Executes immediately, like every other assertion.- Returns:
- a ValidationsExecutor object to optionally set a custom validation message
-
matchesScreenshot
Asserts that the element matches its baseline screenshot, using the given diff-budget/mask options (seeVisualComparisonOptions). Executes immediately.- Parameters:
options- the visual comparison options (diff budgets, masks), ornullfor defaults- Returns:
- a ValidationsExecutor object to optionally set a custom validation message
-
matchesAriaSnapshot
Starts an accessible-name-tree regression assertion against the element's baseline aria snapshot.- 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
-