Package org.fluentlenium.core.conditions
Class AbstractFluentListConditions
- java.lang.Object
-
- org.fluentlenium.core.conditions.AbstractFluentListConditions
-
- All Implemented Interfaces:
Conditions<FluentWebElement>,FluentConditions,FluentListConditions,ListConditionsElements
- Direct Known Subclasses:
AtLeastOneElementConditions,EachElementConditions
public abstract class AbstractFluentListConditions extends java.lang.Object implements FluentListConditions, ListConditionsElements
Abstract class conditions on list of elements.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFluentListConditions(java.util.List<? extends FluentWebElement> elements)Creates a new conditions on list of elements.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringConditionsattribute(java.lang.String name)Check conditions on the given attribute the attribute has the given value.booleanattribute(java.lang.String name, java.lang.String value)Check that the attribute has the given value.booleanclassName(java.lang.String className)Check that the class attribute has the given class name.booleanclickable()Check that this element is visible and enabled such that you can click it.booleandisplayed()Check that this element is displayed.booleanenabled()Check that this element is enabled.java.util.List<? extends FluentWebElement>getActualElements()Get the actual list of elements.protected java.util.List<? extends FluentWebElement>getElements()Get the underlying list of elementsStringConditionsid()Check conditions on this element id.booleanid(java.lang.String id)Check that this element has the given id.protected booleanisNegation()Is this conditions list negated ?StringConditionsname()Check conditions on this element name.booleanname(java.lang.String name)Check that this element has the given namebooleanpresent()Check that the currently validated element of this list is present.RectangleConditionsrectangle()check conditions on rectangle of this elementbooleanselected()Check that this element is selected.voidsetNegation(boolean negation)Set negation valueAbstractIntegerConditionssize()Check that this element list has the given size.booleansize(int size)Check that this element list has the given size.booleanstale()Check that this element is no longer attached to the DOM.StringConditionstagName()Check conditions on this element tagName.booleantagName(java.lang.String tagName)Check that this element has the given tagNameStringConditionstext()Check conditions on this element text.booleantext(java.lang.String text)Check that this element has the given text.StringConditionstextContent()Check conditions on this element text content.booleantextContent(java.lang.String anotherString)Check conditions on this element text content.StringConditionsvalue()Check conditions on this element value.booleanvalue(java.lang.String value)Check that this element has the given valuebooleanverify(java.util.function.Predicate<FluentWebElement> predicate)Check that the given predicate is verified against this condition object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.fluentlenium.core.conditions.FluentListConditions
not, verify
-
-
-
-
Constructor Detail
-
AbstractFluentListConditions
protected AbstractFluentListConditions(java.util.List<? extends FluentWebElement> elements)
Creates a new conditions on list of elements.- Parameters:
elements- underlying elements
-
-
Method Detail
-
size
public boolean size(int size)
Description copied from interface:FluentListConditionsCheck that this element list has the given size.- Specified by:
sizein interfaceFluentListConditions- Parameters:
size- size of the list- Returns:
- true if it has the given size, false otherwise
-
isNegation
protected boolean isNegation()
Is this conditions list negated ?- Returns:
- true if this conditions list is negated, false otherwise.
-
setNegation
public void setNegation(boolean negation)
Set negation value- Parameters:
negation- negation value
-
getElements
protected java.util.List<? extends FluentWebElement> getElements()
Get the underlying list of elements- Returns:
- underlying list of elements
-
getActualElements
public java.util.List<? extends FluentWebElement> getActualElements()
Description copied from interface:ListConditionsElementsGet the actual list of elements.- Specified by:
getActualElementsin interfaceListConditionsElements- Returns:
- actual list of elements on which conditions are performed.
-
size
public AbstractIntegerConditions size()
Description copied from interface:FluentListConditionsCheck that this element list has the given size.- Specified by:
sizein interfaceFluentListConditions- Returns:
- an object to configure advanced conditions on size
-
verify
public boolean verify(java.util.function.Predicate<FluentWebElement> predicate)
Description copied from interface:ConditionsCheck that the given predicate is verified against this condition object.- Specified by:
verifyin interfaceConditions<FluentWebElement>- Parameters:
predicate- predicate to check- Returns:
- true if the predicated is checked, false otherwise
-
present
public boolean present()
Description copied from interface:FluentListConditionsCheck that the currently validated element of this list is present.- Specified by:
presentin interfaceFluentConditions- Specified by:
presentin interfaceFluentListConditions- Returns:
- true if the element is present, false otherwise
-
clickable
public boolean clickable()
Description copied from interface:FluentConditionsCheck that this element is visible and enabled such that you can click it.- Specified by:
clickablein interfaceFluentConditions- Returns:
- true if the element can be clicked, false otherwise.
-
stale
public boolean stale()
Description copied from interface:FluentConditionsCheck that this element is no longer attached to the DOM.- Specified by:
stalein interfaceFluentConditions- Returns:
- false if the element is still attached to the DOM, true otherwise.
-
displayed
public boolean displayed()
Description copied from interface:FluentConditionsCheck that this element is displayed.- Specified by:
displayedin interfaceFluentConditions- Returns:
- true if element is displayed, false otherwise.
-
enabled
public boolean enabled()
Description copied from interface:FluentConditionsCheck that this element is enabled.- Specified by:
enabledin interfaceFluentConditions- Returns:
- true if element is enabled, false otherwise.
-
selected
public boolean selected()
Description copied from interface:FluentConditionsCheck that this element is selected.- Specified by:
selectedin interfaceFluentConditions- Returns:
- true if element is selected, false otherwise.
-
attribute
public boolean attribute(java.lang.String name, java.lang.String value)Description copied from interface:FluentConditionsCheck that the attribute has the given value.- Specified by:
attributein interfaceFluentConditions- Parameters:
name- attribute name to checkvalue- attribute value to check- Returns:
- true if the given attribute has the given value, false otherwise.
-
attribute
public StringConditions attribute(java.lang.String name)
Description copied from interface:FluentConditionsCheck conditions on the given attribute the attribute has the given value.- Specified by:
attributein interfaceFluentConditions- Parameters:
name- attribute name to check- Returns:
- An object to configure text attribute value conditions.
-
id
public boolean id(java.lang.String id)
Description copied from interface:FluentConditionsCheck that this element has the given id.- Specified by:
idin interfaceFluentConditions- Parameters:
id- id to check- Returns:
- true if the element has the given id, false otherwise.
-
id
public StringConditions id()
Description copied from interface:FluentConditionsCheck conditions on this element id.- Specified by:
idin interfaceFluentConditions- Returns:
- An object to configure id conditions.
-
name
public StringConditions name()
Description copied from interface:FluentConditionsCheck conditions on this element name.- Specified by:
namein interfaceFluentConditions- Returns:
- An object to configure name conditions.
-
name
public boolean name(java.lang.String name)
Description copied from interface:FluentConditionsCheck that this element has the given name- Specified by:
namein interfaceFluentConditions- Parameters:
name- name to check- Returns:
- true if the element has the given name, false otherwise.
-
tagName
public StringConditions tagName()
Description copied from interface:FluentConditionsCheck conditions on this element tagName.- Specified by:
tagNamein interfaceFluentConditions- Returns:
- An object to configure tagName conditions.
-
tagName
public boolean tagName(java.lang.String tagName)
Description copied from interface:FluentConditionsCheck that this element has the given tagName- Specified by:
tagNamein interfaceFluentConditions- Parameters:
tagName- tagName to check- Returns:
- true if the element has the given tagName, false otherwise.
-
value
public StringConditions value()
Description copied from interface:FluentConditionsCheck conditions on this element value.- Specified by:
valuein interfaceFluentConditions- Returns:
- An object to configure value conditions.
-
value
public boolean value(java.lang.String value)
Description copied from interface:FluentConditionsCheck that this element has the given value- Specified by:
valuein interfaceFluentConditions- Parameters:
value- value to check- Returns:
- true if the element has the given value, false otherwise.
-
text
public StringConditions text()
Description copied from interface:FluentConditionsCheck conditions on this element text.- Specified by:
textin interfaceFluentConditions- Returns:
- An object to configure text conditions.
-
text
public boolean text(java.lang.String text)
Description copied from interface:FluentConditionsCheck that this element has the given text.- Specified by:
textin interfaceFluentConditions- Parameters:
text- string to compare with- Returns:
- true if the element has the given text, false otherwise.
- See Also:
StringConditions.equalTo(String)
-
textContent
public StringConditions textContent()
Description copied from interface:FluentConditionsCheck conditions on this element text content.- Specified by:
textContentin interfaceFluentConditions- Returns:
- An object to configure text content conditions.
-
textContent
public boolean textContent(java.lang.String anotherString)
Description copied from interface:FluentConditionsCheck conditions on this element text content.- Specified by:
textContentin interfaceFluentConditions- Parameters:
anotherString- string to compare with- Returns:
- true if the element has the given text content, false otherwise.
- See Also:
StringConditions.equalTo(String)
-
rectangle
public RectangleConditions rectangle()
Description copied from interface:FluentConditionscheck conditions on rectangle of this element- Specified by:
rectanglein interfaceFluentConditions- Returns:
- An object to configure advanced position conditions
-
className
public boolean className(java.lang.String className)
Description copied from interface:FluentConditionsCheck that the class attribute has the given class name.- Specified by:
classNamein interfaceFluentConditions- Parameters:
className- class name- Returns:
- true if it has the given class name, false otherwise.
-
-