Package com.codeborne.selenide
Class WebElementCondition
java.lang.Object
com.codeborne.selenide.WebElementCondition
- Direct Known Subclasses:
And,Animated,Attribute,AttributeWithValue,AttributeWithValue,Checked,CssClass,CssValue,CustomMatch,Disabled,DomAttribute,DomAttributeValue,DomProperty,DomPropertyValue,Enabled,Exist,ExplainedCondition,Focused,Hidden,IsImageLoaded,MatchAttributeWithValue,NamedCondition,Not,Or,PartialValue,PseudoElementPropertyWithValue,Selected,TagName,TemporalCondition,TemporalFormatCondition,TextCondition,Value,Visible
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWebElementCondition(String name) protectedWebElementCondition(String name, boolean missingElementSatisfiesCondition) -
Method Summary
Modifier and TypeMethodDescriptionShould be used for explaining the reason of conditionabstract CheckResultCheck if given element matches this conditiongetName()booleannegate()or(WebElementCondition alternative) Using "or" checks in tests is probably a flag of bad test design.toString()
-
Field Details
-
name
-
missingElementSatisfiesCondition
protected final boolean missingElementSatisfiesCondition
-
-
Constructor Details
-
WebElementCondition
-
WebElementCondition
-
-
Method Details
-
check
Check if given element matches this condition- Parameters:
driver- selenide driverelement- given WebElement- Returns:
CheckResult.Verdict.ACCEPTif element matches condition, orCheckResult.Verdict.REJECTif element doesn't match (and we should keep trying until timeout).
-
negate
-
because
Should be used for explaining the reason of condition -
toString
-
getName
-
missingElementSatisfiesCondition
public boolean missingElementSatisfiesCondition() -
or
Using "or" checks in tests is probably a flag of bad test design. Consider splitting this "or" check into two different methods or tests.- See Also:
-