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
-
Constructor Summary
ModifierConstructorDescriptionprotected
WebElementCondition
(String name) protected
WebElementCondition
(String name, boolean missingElementSatisfiesCondition) -
Method Summary
Modifier and TypeMethodDescriptionShould be used for explaining the reason of conditionabstract CheckResult
Check if given element matches this conditiongetName()
boolean
negate()
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.ACCEPT
if element matches condition, orCheckResult.Verdict.REJECT
if 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:
-