Package io.jmix.masquerade.condition
Interface SpecificCheck
- All Known Implementing Classes:
SpecificCheck.ComputedCheck,SpecificCheck.ElementCheck
@NullMarked
public interface SpecificCheck
Description of how a
SpecificCondition must be checked, produced by a SpecificConditionHandler.
A handler only describes the check and never asserts on a value mismatch by itself. The actual
ACCEPT/REJECT CheckResult verdict is computed centrally by SpecificCondition.check(com.codeborne.selenide.Driver, org.openqa.selenium.WebElement), so that
specific conditions can be negated (shouldNot*) and composed (and/or).
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordSpecificCheckwith a precomputed verdict.static final recordSpecificCheckthat evaluates a standard SelenideWebElementConditionagainst an element. -
Method Summary
Modifier and TypeMethodDescriptioncom.codeborne.selenide.CheckResultevaluate(com.codeborne.selenide.Driver driver) Computes the verdict of this check.static SpecificCheckCreates a check with a precomputed verdict, for conditions that are not backed by a single Selenide condition (e.g.static SpecificCheckof(com.codeborne.selenide.SelenideElement element, com.codeborne.selenide.WebElementCondition condition) Creates a check that evaluates the given standard Selenideconditionagainst theelement.
-
Method Details
-
evaluate
com.codeborne.selenide.CheckResult evaluate(com.codeborne.selenide.Driver driver) Computes the verdict of this check.- Parameters:
driver- selenide driver- Returns:
- verdict of the check
-
of
static SpecificCheck of(com.codeborne.selenide.SelenideElement element, com.codeborne.selenide.WebElementCondition condition) Creates a check that evaluates the given standard Selenideconditionagainst theelement.- Parameters:
element- element to evaluate the condition againstcondition- standard Selenide condition to evaluate- Returns:
- element-backed check
-
of
Creates a check with a precomputed verdict, for conditions that are not backed by a single Selenide condition (e.g. collection conditions).- Parameters:
matched- whether the condition is matchedactualValue- actual value to report in case of a mismatch- Returns:
- precomputed check
-