Package org.fluentlenium.core.domain
Interface FluentList<E extends FluentWebElement>
-
- Type Parameters:
E
- type of element
- All Superinterfaces:
java.util.Collection<E>
,FluentActions<FluentList<E>,E>
,FluentJavascriptActions
,FluentLabel<FluentList<E>>
,FluentProxyState<FluentList<E>>
,HookControl<FluentList<E>>
,java.lang.Iterable<E>
,java.util.List<E>
,SearchControl<E>
- All Known Implementing Classes:
FluentListImpl
public interface FluentList<E extends FluentWebElement> extends java.util.List<E>, FluentActions<FluentList<E>,E>, FluentProxyState<FluentList<E>>, SearchControl<E>, HookControl<FluentList<E>>, FluentLabel<FluentList<E>>
Wraps a list ofFluentWebElement
. It provides an enhanced API to control list of selenium elements.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends FluentWebElement>
FluentList<T>as(java.lang.Class<T> componentClass)
Wrap all underlying elements in a componen..java.util.List<java.lang.String>
attributes(java.lang.String attribute)
Return a custom attribute of elements on the listFluentWaitElementList
await()
Build a wait object to wait for a condition of this element list.FluentListConditions
awaitUntilEach()
Build a condition object on this element list that will match if each underlying element match, automatically waiting for condition to be verified.FluentListConditions
awaitUntilOne()
Build a condition object on this element list that will match if one or more underlying element match, automatically waiting for condition to be verified.void
clear()
Clear visible elements on the listFluentList<E>
clearAll()
Clear all elements on the listFluentList<E>
clearAllReactInputs()
Clear all React elements on the listvoid
clearList()
CallsList.clear()
from underlying List implementation.FluentList<E>
click()
Click on all elements on the list Only the clickable elements are clickedFluentList<E>
contextClick()
context click on all elements on the list Only the clickable elements are clickedint
count()
Count elements without actually loading the lazy list.java.util.List<org.openqa.selenium.Dimension>
dimensions()
Return the Dimension of elements on the listFluentList<E>
doubleClick()
double click on all elements on the list Only the clickable elements are clickedFluentListConditions
each()
Build a condition object on this element list that will match if each underlying element match.FluentList<E>
find(java.lang.String selector, SearchFilter... filters)
find elements into the children with the corresponding filtersFluentList<E>
find(SearchFilter... filters)
find elements in the children with the corresponding filtersE
first()
Retrieve the first element.java.util.List<java.lang.String>
ids()
Return the id of elements on the listE
index(int index)
Retrieve an element at given index.E
last()
Retrieve the last element.java.util.List<java.lang.String>
names()
Return the name of elements on the listFluentListConditions
one()
Build a condition object on this element list that will match if one or more underlying element match.E
single()
Retrieve the first element and checks is it exactly one element in the listFluentList<E>
submit()
submit on all elements on the list Only the visible elements are submittedjava.util.List<java.lang.String>
tagNames()
Return the tag name of elements on the listjava.util.List<java.lang.String>
textContents()
Return the text contents of list elementsjava.util.List<java.lang.String>
texts()
Return the texts of list elementsjava.util.List<org.openqa.selenium.WebElement>
toElements()
Creates a list of SeleniumWebElement
from this listjava.util.List<java.lang.String>
values()
Return the value of elements on the listFluentList<E>
write(java.lang.String... with)
Fill all elements on the list with the corresponding cell in the with table.-
Methods inherited from interface org.fluentlenium.core.action.FluentActions
fill, fillSelect, frame
-
Methods inherited from interface org.fluentlenium.core.action.FluentJavascriptActions
modifyAttribute, scrollIntoView, scrollIntoView, scrollToCenter
-
Methods inherited from interface org.fluentlenium.core.label.FluentLabel
withLabel, withLabelHint
-
Methods inherited from interface org.fluentlenium.core.proxy.FluentProxyState
loaded, now, now, optional, present, reset
-
Methods inherited from interface org.fluentlenium.core.hook.HookControl
noHook, noHook, noHook, noHook, noHookInstance, noHookInstance, restoreHooks, withHook, withHook
-
-
-
-
Method Detail
-
first
E first()
Retrieve the first element.- Returns:
- first element
-
single
E single()
Retrieve the first element and checks is it exactly one element in the list- Returns:
- first element
-
last
E last()
Retrieve the last element.- Returns:
- last element
-
index
E index(int index)
Retrieve an element at given index.- Parameters:
index
- position of the element to retrieve- Returns:
- element at given index
-
toElements
java.util.List<org.openqa.selenium.WebElement> toElements()
Creates a list of SeleniumWebElement
from this list- Returns:
- list of selenium elements
-
click
FluentList<E> click()
Click on all elements on the list Only the clickable elements are clicked- Specified by:
click
in interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>
- Returns:
- this object reference to chain methods calls
- See Also:
WebElement.click()
-
doubleClick
FluentList<E> doubleClick()
double click on all elements on the list Only the clickable elements are clicked- Specified by:
doubleClick
in interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>
- Returns:
- this object reference to chain methods calls
-
contextClick
FluentList<E> contextClick()
context click on all elements on the list Only the clickable elements are clicked- Specified by:
contextClick
in interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>
- Returns:
- this object reference to chain methods calls
-
write
FluentList<E> write(java.lang.String... with)
Fill all elements on the list with the corresponding cell in the with table. Only the visible elements are filled If there is more elements on the list than in the with table, the last element of the table is repeated- Specified by:
write
in interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>
- Parameters:
with
- one or many text to send.- Returns:
- this object reference to chain methods calls.
- See Also:
WebElement.sendKeys(CharSequence...)
-
submit
FluentList<E> submit()
submit on all elements on the list Only the visible elements are submitted- Specified by:
submit
in interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>
- Returns:
- this object reference to chain methods calls.
- See Also:
WebElement.submit()
-
values
java.util.List<java.lang.String> values()
Return the value of elements on the list- Returns:
- list of string values
-
ids
java.util.List<java.lang.String> ids()
Return the id of elements on the list- Returns:
- list of string values
-
attributes
java.util.List<java.lang.String> attributes(java.lang.String attribute)
Return a custom attribute of elements on the list- Parameters:
attribute
- attribute name- Returns:
- list of string valuess
-
names
java.util.List<java.lang.String> names()
Return the name of elements on the list- Returns:
- list of string values
-
dimensions
java.util.List<org.openqa.selenium.Dimension> dimensions()
Return the Dimension of elements on the list- Returns:
- list of Dimensions
-
tagNames
java.util.List<java.lang.String> tagNames()
Return the tag name of elements on the list- Returns:
- list of string values
-
texts
java.util.List<java.lang.String> texts()
Return the texts of list elements- Returns:
- list of string values
-
textContents
java.util.List<java.lang.String> textContents()
Return the text contents of list elements- Returns:
- list of string values
-
find
FluentList<E> find(java.lang.String selector, SearchFilter... filters)
find elements into the children with the corresponding filters- Specified by:
find
in interfaceSearchControl<E extends FluentWebElement>
- Parameters:
selector
- element namefilters
- set of filters- Returns:
- extended by FluentWebElement objects list
-
find
FluentList<E> find(SearchFilter... filters)
find elements in the children with the corresponding filters- Specified by:
find
in interfaceSearchControl<E extends FluentWebElement>
- Parameters:
filters
- set of filters- Returns:
- extended by FluentWebElement objects list
-
count
int count()
Count elements without actually loading the lazy list.This method ignore defined hooks.
- Returns:
- elements count
-
clearAll
FluentList<E> clearAll()
Clear all elements on the listOnly the visible elements are cleared.
- Returns:
- extended by FluentWebElement object
-
clearAllReactInputs
FluentList<E> clearAllReactInputs()
Clear all React elements on the listOnly the visible elements are cleared.
- Returns:
- extended by FluentWebElement object
-
clear
void clear()
Clear visible elements on the list- Specified by:
clear
in interfacejava.util.Collection<E extends FluentWebElement>
- Specified by:
clear
in interfacejava.util.List<E extends FluentWebElement>
-
clearList
void clearList()
CallsList.clear()
from underlying List implementation.- See Also:
List.clear()
-
as
<T extends FluentWebElement> FluentList<T> as(java.lang.Class<T> componentClass)
Wrap all underlying elements in a componen..- Type Parameters:
T
- type of component- Parameters:
componentClass
- component class- Returns:
- fluent list of elements as components.
-
each
FluentListConditions each()
Build a condition object on this element list that will match if each underlying element match.- Returns:
- a condition object
-
one
FluentListConditions one()
Build a condition object on this element list that will match if one or more underlying element match.- Returns:
- a condition object
-
await
FluentWaitElementList await()
Build a wait object to wait for a condition of this element list.- Returns:
- a wait object
-
awaitUntilEach
FluentListConditions awaitUntilEach()
Build a condition object on this element list that will match if each underlying element match, automatically waiting for condition to be verified.- Returns:
- a condition object
-
awaitUntilOne
FluentListConditions awaitUntilOne()
Build a condition object on this element list that will match if one or more underlying element match, automatically waiting for condition to be verified.- Returns:
- a condition object
-
-