Package io.fluentlenium.core.domain
Interface FluentList<E extends FluentWebElement>
- Type Parameters:
E- type of element
- All Superinterfaces:
Collection<E>,FluentActions<FluentList<E>,,E> FluentJavascriptActions,FluentLabel<FluentList<E>>,FluentProxyState<FluentList<E>>,HookControl<FluentList<E>>,Iterable<E>,List<E>,SearchControl<E>
- All Known Implementing Classes:
FluentListImpl
public interface FluentList<E extends FluentWebElement>
extends List<E>, FluentActions<FluentList<E>,E>, FluentProxyState<FluentList<E>>, SearchControl<E>, HookControl<FluentList<E>>, FluentLabel<FluentList<E>>
Wraps a list of
FluentWebElement. It provides an enhanced API to control list of selenium elements.-
Method Summary
Modifier and TypeMethodDescription<T extends FluentWebElement>
FluentList<T>Wrap all underlying elements in a component.attributes(String attribute) Return a custom attribute of elements on the listawait()Build a wait object to wait for a condition of this element list.Build a condition object on this element list that will match if each underlying element match, automatically waiting for condition to be verified.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.voidclear()Clear visible elements on the listclearAll()Clear all elements on the listClear all React elements on the listvoidCallsList.clear()from underlying List implementation.click()Click on all elements on the list Only the clickable elements are clickedcontext click on all elements on the list Only the clickable elements are clickedintcount()Count elements without actually loading the lazy list.default List<org.openqa.selenium.Dimension>Return the Dimension of elements on the listdouble click on all elements on the list Only the clickable elements are clickedeach()Build a condition object on this element list that will match if each underlying element match.find(SearchFilter... filters) find elements in the children with the corresponding filtersfind(String selector, SearchFilter... filters) find elements into the children with the corresponding filtersfirst()Retrieve the first element.default FluentList<E>Hovers the mouse over the current element.ids()Return the id of elements on the listindex(int index) Retrieve an element at given index.last()Retrieve the last element.names()Return the name of elements on the listone()Build a condition object on this element list that will match if one or more underlying element match.single()Retrieve the first element and checks is it exactly one element in the listsubmit()submit on all elements on the list Only the visible elements are submittedtagNames()Return the tag name of elements on the listReturn the text contents of list elementstexts()Return the texts of list elementsdefault List<org.openqa.selenium.WebElement>Creates a list of SeleniumWebElementfrom this listvalues()Return the value of elements on the listFill all elements on the list with the corresponding cell in the with array.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface io.fluentlenium.core.action.FluentActions
fill, fillSelect, frame, waitAndClick, waitAndClickMethods inherited from interface io.fluentlenium.core.action.FluentJavascriptActions
modifyAttribute, scrollIntoView, scrollIntoView, scrollToCenterMethods inherited from interface io.fluentlenium.core.label.FluentLabel
withLabel, withLabelHintMethods inherited from interface io.fluentlenium.core.proxy.FluentProxyState
loaded, now, now, optional, present, resetMethods inherited from interface io.fluentlenium.core.hook.HookControl
noHook, noHook, noHook, noHook, noHookInstance, noHookInstance, restoreHooks, withHook, withHookMethods inherited from interface java.util.List
add, add, addAll, addAll, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Method Details
-
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
Retrieve an element at given index.- Parameters:
index- position of the element to retrieve- Returns:
- element at given index
-
toElements
Creates a list of SeleniumWebElementfrom 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:
clickin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement> - Returns:
- the current instance of FluentList to provide capability for chaining calls
- See Also:
-
doubleClick
FluentList<E> doubleClick()double click on all elements on the list Only the clickable elements are clicked- Specified by:
doubleClickin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement> - Returns:
- the current instance of FluentList to provide capability for chaining calls
-
contextClick
FluentList<E> contextClick()context click on all elements on the list Only the clickable elements are clicked- Specified by:
contextClickin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement> - Returns:
- the current instance of FluentList to provide capability for chaining calls
-
write
Fill all elements on the list with the corresponding cell in the with array. Only the visible elements are filled If there are more elements on the list than in the with array, the last element of the table is repeated- Specified by:
writein interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement> - Parameters:
with- one or many text to send.- Returns:
- the current instance of FluentList to provide capability for chaining calls
- See Also:
-
submit
FluentList<E> submit()submit on all elements on the list Only the visible elements are submitted- Specified by:
submitin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement> - Returns:
- the current instance of FluentList to provide capability for chaining calls
- See Also:
-
hoverOver
Description copied from interface:FluentActionsHovers the mouse over the current element.By default, this is a convenience method for calling
element.mouse().moveToElement().- Specified by:
hoverOverin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement> - Returns:
- the current element
-
values
Return the value of elements on the list- Returns:
- list of string values
-
ids
Return the id of elements on the list- Returns:
- list of string values
-
attributes
Return a custom attribute of elements on the list- Parameters:
attribute- attribute name- Returns:
- list of string values
-
names
Return the name of elements on the list- Returns:
- list of string values
-
dimensions
Return the Dimension of elements on the list- Returns:
- list of Dimensions
-
tagNames
Return the tag name of elements on the list- Returns:
- list of string values
-
texts
Return the texts of list elements- Returns:
- list of string values
-
textContents
Return the text contents of list elements- Returns:
- list of string values
-
find
find elements into the children with the corresponding filters- Specified by:
findin interfaceSearchControl<E extends FluentWebElement>- Parameters:
selector- element namefilters- set of filters- Returns:
- extended by FluentWebElement objects list
-
find
find elements in the children with the corresponding filters- Specified by:
findin 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:
clearin interfaceCollection<E extends FluentWebElement>- Specified by:
clearin interfaceList<E extends FluentWebElement>
-
clearList
void clearList()CallsList.clear()from underlying List implementation.- See Also:
-
as
Wrap all underlying elements in a component.- 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
-