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 protected
AbstractFluentListConditions(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 StringConditions
attribute(java.lang.String name)
Check conditions on the given attribute the attribute has the given value.boolean
className(java.lang.String className)
Check that the class attribute has the given class name.boolean
clickable()
Check that this element is visible and enabled such that you can click it.boolean
displayed()
Check that this element is displayed.boolean
enabled()
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 elementsStringConditions
id()
Check conditions on this element id.protected boolean
isNegation()
Is this conditions list negated ?StringConditions
name()
Check conditions on this element name.boolean
present()
Check that the currently validated element of this list is present.RectangleConditions
rectangle()
check conditions on rectangle of this elementboolean
selected()
Check that this element is selected.void
setNegation(boolean negation)
Set negation valueAbstractIntegerConditions
size()
Check that this element list has the given size.boolean
size(int size)
Check that this element list has the given size.boolean
stale()
Check that this element is no longer attached to the DOM.StringConditions
tagName()
Check conditions on this element tagName.StringConditions
text()
Check conditions on this element text.StringConditions
textContent()
Check conditions on this element text content.StringConditions
value()
Check conditions on this element value.boolean
verify(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.FluentConditions
attribute, id, name, tagName, text, textContent, value
-
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:FluentListConditions
Check that this element list has the given size.- Specified by:
size
in 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:ListConditionsElements
Get the actual list of elements.- Specified by:
getActualElements
in interfaceListConditionsElements
- Returns:
- actual list of elements on which conditions are performed.
-
size
public AbstractIntegerConditions size()
Description copied from interface:FluentListConditions
Check that this element list has the given size.- Specified by:
size
in interfaceFluentListConditions
- Returns:
- an object to configure advanced conditions on size
-
verify
public boolean verify(java.util.function.Predicate<FluentWebElement> predicate)
Description copied from interface:Conditions
Check that the given predicate is verified against this condition object.- Specified by:
verify
in interfaceConditions<FluentWebElement>
- Parameters:
predicate
- predicate to check- Returns:
- true if the predicated is checked, false otherwise
-
present
public boolean present()
Description copied from interface:FluentListConditions
Check that the currently validated element of this list is present.- Specified by:
present
in interfaceFluentConditions
- Specified by:
present
in interfaceFluentListConditions
- Returns:
- true if the element is present, false otherwise
-
clickable
public boolean clickable()
Description copied from interface:FluentConditions
Check that this element is visible and enabled such that you can click it.- Specified by:
clickable
in interfaceFluentConditions
- Returns:
- true if the element can be clicked, false otherwise.
-
stale
public boolean stale()
Description copied from interface:FluentConditions
Check that this element is no longer attached to the DOM.- Specified by:
stale
in interfaceFluentConditions
- Returns:
- false if the element is still attached to the DOM, true otherwise.
-
displayed
public boolean displayed()
Description copied from interface:FluentConditions
Check that this element is displayed.- Specified by:
displayed
in interfaceFluentConditions
- Returns:
- true if element is displayed, false otherwise.
-
enabled
public boolean enabled()
Description copied from interface:FluentConditions
Check that this element is enabled.- Specified by:
enabled
in interfaceFluentConditions
- Returns:
- true if element is enabled, false otherwise.
-
selected
public boolean selected()
Description copied from interface:FluentConditions
Check that this element is selected.- Specified by:
selected
in interfaceFluentConditions
- Returns:
- true if element is selected, false otherwise.
-
attribute
public StringConditions attribute(java.lang.String name)
Description copied from interface:FluentConditions
Check conditions on the given attribute the attribute has the given value.- Specified by:
attribute
in interfaceFluentConditions
- Parameters:
name
- attribute name to check- Returns:
- An object to configure text attribute value conditions.
-
id
public StringConditions id()
Description copied from interface:FluentConditions
Check conditions on this element id.- Specified by:
id
in interfaceFluentConditions
- Returns:
- An object to configure id conditions.
-
name
public StringConditions name()
Description copied from interface:FluentConditions
Check conditions on this element name.- Specified by:
name
in interfaceFluentConditions
- Returns:
- An object to configure name conditions.
-
tagName
public StringConditions tagName()
Description copied from interface:FluentConditions
Check conditions on this element tagName.- Specified by:
tagName
in interfaceFluentConditions
- Returns:
- An object to configure tagName conditions.
-
value
public StringConditions value()
Description copied from interface:FluentConditions
Check conditions on this element value.- Specified by:
value
in interfaceFluentConditions
- Returns:
- An object to configure value conditions.
-
text
public StringConditions text()
Description copied from interface:FluentConditions
Check conditions on this element text.- Specified by:
text
in interfaceFluentConditions
- Returns:
- An object to configure text conditions.
-
textContent
public StringConditions textContent()
Description copied from interface:FluentConditions
Check conditions on this element text content.- Specified by:
textContent
in interfaceFluentConditions
- Returns:
- An object to configure text content conditions.
-
rectangle
public RectangleConditions rectangle()
Description copied from interface:FluentConditions
check conditions on rectangle of this element- Specified by:
rectangle
in interfaceFluentConditions
- Returns:
- An object to configure advanced position conditions
-
className
public boolean className(java.lang.String className)
Description copied from interface:FluentConditions
Check that the class attribute has the given class name.- Specified by:
className
in interfaceFluentConditions
- Parameters:
className
- class name- Returns:
- true if it has the given class name, false otherwise.
-
-