Package io.fluentlenium.core.filter
Class AttributeFilter
java.lang.Object
io.fluentlenium.core.filter.AttributeFilter
- All Implemented Interfaces:
SearchFilter
Search filter based on attribute value.
-
Constructor Summary
ConstructorsConstructorDescriptionAttributeFilter(String customAttribute, AbstractMatcher matcher) Construct a filter with a custom attribute and an associated matcherAttributeFilter(String attributeName, String value) Construct a filter with an attribute name and an associated value -
Method Summary
Modifier and TypeMethodDescriptionapplyFilter(Collection<FluentWebElement> elements) Apply the filter.Get the attribute name (lower case).Get the CSS string used by CSS search time filtering.Get the matcher of this filterbooleanDoes this filter support filtering at search time with CSS selector.toString()
-
Constructor Details
-
AttributeFilter
Construct a filter with an attribute name and an associated value- Parameters:
attributeName- attribute namevalue- value to filter
-
AttributeFilter
Construct a filter with a custom attribute and an associated matcher- Parameters:
customAttribute- custom attribute namematcher- matcher
-
-
Method Details
-
getAttribute
Get the attribute name (lower case).- Returns:
- attribute name (lower case)
-
getMatcher
Get the matcher of this filter- Returns:
- matcher
-
toString
-
getCssFilter
Description copied from interface:SearchFilterGet the CSS string used by CSS search time filtering.- Specified by:
getCssFilterin interfaceSearchFilter- Returns:
- css filter string
-
isCssFilterSupported
public boolean isCssFilterSupported()Description copied from interface:SearchFilterDoes this filter support filtering at search time with CSS selector.- Specified by:
isCssFilterSupportedin interfaceSearchFilter- Returns:
- true if CSS filtering is supported, else false
-
applyFilter
Description copied from interface:SearchFilterApply the filter.- Specified by:
applyFilterin interfaceSearchFilter- Parameters:
elements- input elements- Returns:
- filtered elements
-