Package io.fluentlenium.core.conditions
Class WebElementConditions
java.lang.Object
io.fluentlenium.core.conditions.AbstractObjectConditions<FluentWebElement>
io.fluentlenium.core.conditions.WebElementConditions
- All Implemented Interfaces:
Conditions<FluentWebElement>
,ConditionsObject<FluentWebElement>
,FluentConditions
public class WebElementConditions
extends AbstractObjectConditions<FluentWebElement>
implements FluentConditions
Fluent object to handle
ExpectedConditions
on FluentWebElement in
fluentlenium API.
-
Field Summary
Fields inherited from class io.fluentlenium.core.conditions.AbstractObjectConditions
negation, object
-
Constructor Summary
ConstructorsConstructorDescriptionWebElementConditions
(FluentWebElement element) Creates a new conditions object on elementWebElementConditions
(FluentWebElement element, boolean negation) Creates a new conditions object on element -
Method Summary
Modifier and TypeMethodDescriptionCheck conditions on the given attribute the attribute has the given value.boolean
Check that the class attribute has the given class name.boolean
Check that this element is visible and enabled such that you can click it.boolean
Check that this element is displayed.boolean
enabled()
Check that this element is enabled.id()
Check conditions on this element id.name()
Check conditions on this element name.protected AbstractObjectConditions<FluentWebElement>
newInstance
(boolean negationValue) Creates a new instance of this condition.not()
Negates this condition object.boolean
present()
Check that this element is presentcheck conditions on rectangle of this elementboolean
selected()
Check that this element is selected.boolean
stale()
Check that this element is no longer attached to the DOM.tagName()
Check conditions on this element tagName.text()
Check conditions on this element text.Check conditions on this element text content.value()
Check conditions on this element value.Methods inherited from class io.fluentlenium.core.conditions.AbstractObjectConditions
getActualObject, verify
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.fluentlenium.core.conditions.Conditions
verify
Methods inherited from interface io.fluentlenium.core.conditions.FluentConditions
attribute, id, name, tagName, text, textContent, value
-
Constructor Details
-
WebElementConditions
Creates a new conditions object on element- Parameters:
element
- underlying element
-
WebElementConditions
Creates a new conditions object on element- Parameters:
element
- underlying elementnegation
- negation value
-
-
Method Details
-
newInstance
Description copied from class:AbstractObjectConditions
Creates a new instance of this condition.- Specified by:
newInstance
in classAbstractObjectConditions<FluentWebElement>
- Parameters:
negationValue
- negation value- Returns:
- new instance of this condition
-
not
Description copied from interface:Conditions
Negates this condition object.- Specified by:
not
in interfaceConditions<FluentWebElement>
- Specified by:
not
in interfaceFluentConditions
- Overrides:
not
in classAbstractObjectConditions<FluentWebElement>
- Returns:
- a negated condition object
-
present
public boolean present()Description copied from interface:FluentConditions
Check that this element is present- Specified by:
present
in interfaceFluentConditions
- 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
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
Description copied from interface:FluentConditions
Check conditions on this element id.- Specified by:
id
in interfaceFluentConditions
- Returns:
- An object to configure id conditions.
-
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
Description copied from interface:FluentConditions
Check conditions on this element tagName.- Specified by:
tagName
in interfaceFluentConditions
- Returns:
- An object to configure tagName conditions.
-
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
Description copied from interface:FluentConditions
Check conditions on this element text.- Specified by:
text
in interfaceFluentConditions
- Returns:
- An object to configure text conditions.
-
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
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
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.
-