Package com.codeborne.selenide
Class WebElementsCondition
java.lang.Object
com.codeborne.selenide.WebElementsCondition
- Direct Known Subclasses:
Attributes
,ContainExactTextsCaseSensitive
,ExactTexts
,ItemWithText
,ListSize
,PredicateCollectionCondition
,SizeGreaterThan
,SizeGreaterThanOrEqual
,SizeLessThan
,SizeLessThanOrEqual
,SizeNotEqual
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionUse for explaining the reason of condition: WHY you think this collection should match that condition?check
(CollectionSource collection) The most powerful way to implement condition.void
fail
(CollectionSource collection, CheckResult lastCheckResult, @Nullable Exception cause, long timeoutMs) Override this method if you want to customize error class or descriptionboolean
or
(WebElementsCondition alternative) Using "or" checks in tests is probably a flag of bad test design.abstract String
toString()
-
Field Details
-
explanation
-
-
Constructor Details
-
WebElementsCondition
public WebElementsCondition()
-
-
Method Details
-
check
-
check
The most powerful way to implement condition. Can check the collection using JavaScript or any other effective means. Also, can return "actual values" in the returnedCheckResult
object. -
fail
public void fail(CollectionSource collection, CheckResult lastCheckResult, @Nullable Exception cause, long timeoutMs) Override this method if you want to customize error class or description -
errorMessage
-
expectedValue
-
toString
-
because
Use for explaining the reason of condition: WHY you think this collection should match that condition? -
missingElementsSatisfyCondition
public boolean missingElementsSatisfyCondition() -
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:
-