Package org.fluentlenium.core.domain
Class FluentListImpl<E extends FluentWebElement>
- java.lang.Object
-
- org.fluentlenium.core.domain.ListImpl<T>
-
- org.fluentlenium.core.domain.DelegatingList<T>
-
- org.fluentlenium.core.domain.ComponentList<E>
-
- org.fluentlenium.core.domain.FluentListImpl<E>
-
- Type Parameters:
E- type of fluent element
- All Implemented Interfaces:
java.lang.Iterable<E>,java.util.Collection<E>,java.util.List<E>,FluentActions<FluentList<E>,E>,FluentJavascriptActions,LazyComponents,FluentList<E>,WrapsElements,HookControl<FluentList<E>>,FluentLabel<FluentList<E>>,FluentProxyState<FluentList<E>>,SearchControl<E>
public class FluentListImpl<E extends FluentWebElement> extends ComponentList<E> implements FluentList<E>
Map the list to a FluentList in order to offers some events like click(), submit(), value() ...
-
-
Field Summary
-
Fields inherited from class org.fluentlenium.core.domain.ComponentList
componentClass, control, instantiator, proxy
-
Fields inherited from class org.fluentlenium.core.domain.DelegatingList
list
-
-
Constructor Summary
Constructors Constructor Description FluentListImpl(java.lang.Class<E> componentClass, java.util.List<E> list, FluentControl control, ComponentInstantiator instantiator)Creates a new fluent list.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FluentList<E>$(java.util.List<org.openqa.selenium.WebElement> rawElements)Wrap raw selenium elements into a list of elements.<T extends FluentWebElement>
FluentList<T>as(java.lang.Class<T> componentClass)Wrap all underlying elements in a component.java.util.List<java.lang.String>attributes(java.lang.String attribute)Return a custom attribute of elements on the listFluentWaitElementListawait()Build a wait object to wait for a condition of this element list.FluentListConditionsawaitUntilEach()Build a condition object on this element list that will match if each underlying element match, automatically waiting for condition to be verified.FluentListConditionsawaitUntilOne()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 listFluentList<E>clearAll()Clear all elements on the listFluentList<E>clearAllReactInputs()Clear all React elements on the listvoidclearList()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 clickedintcount()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 clickedFluentListConditionseach()Build a condition object on this element list that will match if each underlying element match.Eel(org.openqa.selenium.WebElement rawElement)Wrap existing raw selenium element into an element.Fillfill()Construct a Fill Builder in order to allow easy fill of visible input fields.FillSelectfillSelect()Construct a Fill Select Builder in order to allow easy fill of visible input fields.FluentList<E>find(java.lang.String selector, SearchFilter... filters)find elements into the children with the corresponding filtersFluentList<E>find(java.util.List<org.openqa.selenium.WebElement> rawElements)Wrap raw selenium elements into a list of elements.FluentList<E>find(SearchFilter... filters)find elements in the children with the corresponding filtersFluentList<E>find(org.openqa.selenium.By locator, SearchFilter... filters)Find list of elements with Selenium locator and filters.Efirst()Retrieve the first element.FluentList<E>frame()Select a frame using this element.Eget(int index)java.util.List<java.lang.String>ids()Return the id of elements on the listEindex(int index)Retrieve an element at given index.Elast()Retrieve the last element.booleanloaded()Check if the element is loaded.FluentList<E>modifyAttribute(java.lang.String attributeName, java.lang.String attributeValue)Modifies attributes of first element onlyjava.util.List<java.lang.String>names()Return the name of elements on the listFluentList<E>noHook()Disable all hooks from actual element.FluentList<E>noHook(java.lang.Class<? extends FluentHook>... hooks)Disable given hook from actual element.<R> RnoHook(java.lang.Class<? extends FluentHook> hook, java.util.function.Function<FluentList<E>,R> function)Invoke a function with no hook.<R> RnoHook(java.util.function.Function<FluentList<E>,R> function)Invoke a function with no hook.FluentList<E>noHookInstance()Creates a new element locator instance with all hooks disabled.FluentList<E>noHookInstance(java.lang.Class<? extends FluentHook>... hooks)Creates a new element locator instance with given hook disabled.FluentList<E>now()Search for the element now, actually performing the search on theWebDriver.FluentList<E>now(boolean force)Search for the element now, actually performing the search on theWebDriver.FluentListConditionsone()Build a condition object on this element list that will match if one or more underlying element match.java.util.Optional<FluentList<E>>optional()Builds an optional.booleanpresent()Check if the element is present in the DOM.FluentList<E>reset()Reset the element.FluentList<E>restoreHooks()Retore hooks that were defined initially.FluentList<E>scrollIntoView()Scrolls to first element of listFluentList<E>scrollIntoView(boolean alignWithTop)Scrolls to first element of listFluentList<E>scrollToCenter()Scrolls to first element of listEsingle()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 SeleniumWebElementfrom this listjava.lang.StringtoString()java.util.List<java.lang.String>values()Return the value of elements on the listFluentList<E>waitAndClick()Helper method that: a) waits at most 5 seconds for element b) scrolls centrally into it c) clicks on itFluentList<E>waitAndClick(java.time.Duration duration)Helper method that: a) waits for element b) scrolls centrally into it c) clicks on it<O,H extends FluentHook<O>>
FluentList<E>withHook(java.lang.Class<H> hook)Enable a hook with default options.<O,H extends FluentHook<O>>
FluentList<E>withHook(java.lang.Class<H> hook, O options)Enable a hook with given options.FluentList<E>withLabel(java.lang.String label)Apply a label that will be displayed as the representation of this object for error message.FluentList<E>withLabelHint(java.lang.String... labelHint)Add a label hint that will be appended to the representation of this object for error message.FluentList<E>write(java.lang.String... with)Fill all elements on the list with the corresponding cell in the with array.-
Methods inherited from class org.fluentlenium.core.domain.ComponentList
addLazyComponentsListener, getWrappedElements, isLazy, isLazyInitialized, removeLazyComponentsListener
-
Methods inherited from class org.fluentlenium.core.domain.DelegatingList
getList
-
Methods inherited from class org.fluentlenium.core.domain.ListImpl
add, add, addAll, addAll, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
FluentListImpl
public FluentListImpl(java.lang.Class<E> componentClass, java.util.List<E> list, FluentControl control, ComponentInstantiator instantiator)
Creates a new fluent list.- Parameters:
componentClass- component classlist- list of fluent elementcontrol- control interfaceinstantiator- component instantiator
-
-
Method Detail
-
toElements
public java.util.List<org.openqa.selenium.WebElement> toElements()
Description copied from interface:FluentListCreates a list of SeleniumWebElementfrom this list- Specified by:
toElementsin interfaceFluentList<E extends FluentWebElement>- Returns:
- list of selenium elements
-
await
public FluentWaitElementList await()
Description copied from interface:FluentListBuild a wait object to wait for a condition of this element list.- Specified by:
awaitin interfaceFluentList<E extends FluentWebElement>- Returns:
- a wait object
-
first
public E first()
Description copied from interface:FluentListRetrieve the first element.- Specified by:
firstin interfaceFluentList<E extends FluentWebElement>- Returns:
- first element
-
single
public E single()
Description copied from interface:FluentListRetrieve the first element and checks is it exactly one element in the list- Specified by:
singlein interfaceFluentList<E extends FluentWebElement>- Returns:
- first element
-
last
public E last()
Description copied from interface:FluentListRetrieve the last element.- Specified by:
lastin interfaceFluentList<E extends FluentWebElement>- Returns:
- last element
-
get
public E get(int index)
- Specified by:
getin interfacejava.util.List<E extends FluentWebElement>- Overrides:
getin classListImpl<E extends FluentWebElement>
-
index
public E index(int index)
Description copied from interface:FluentListRetrieve an element at given index.- Specified by:
indexin interfaceFluentList<E extends FluentWebElement>- Parameters:
index- position of the element to retrieve- Returns:
- element at given index
-
count
public int count()
Description copied from interface:FluentListCount elements without actually loading the lazy list.This method ignore defined hooks.
- Specified by:
countin interfaceFluentList<E extends FluentWebElement>- Returns:
- elements count
-
present
public boolean present()
Description copied from interface:FluentProxyStateCheck if the element is present in the DOM.- Specified by:
presentin interfaceFluentProxyState<E extends FluentWebElement>- Returns:
- true if the element is present, false otherwise
-
now
public FluentList<E> now()
Description copied from interface:FluentProxyStateSearch for the element now, actually performing the search on theWebDriver.It has no effect if the element is already loaded.
- Specified by:
nowin interfaceFluentProxyState<E extends FluentWebElement>- Returns:
- this object reference to chain calls.
-
now
public FluentList<E> now(boolean force)
Description copied from interface:FluentProxyStateSearch for the element now, actually performing the search on theWebDriver.It has no effect if the element is already loaded.
- Specified by:
nowin interfaceFluentProxyState<E extends FluentWebElement>- Parameters:
force- force the search even if element is already loaded- Returns:
- this object reference to chain calls.
-
reset
public FluentList<E> reset()
Description copied from interface:FluentProxyStateReset the element. Subsequent calls will perform the search again, instead of using the cached result.- Specified by:
resetin interfaceFluentProxyState<E extends FluentWebElement>- Returns:
- this object reference to chain calls.
-
loaded
public boolean loaded()
Description copied from interface:FluentProxyStateCheck if the element is loaded.- Specified by:
loadedin interfaceFluentProxyState<E extends FluentWebElement>- Returns:
- true if the element is loaded, false otherwise
-
click
public FluentList<E> click()
Description copied from interface:FluentListClick on all elements on the list Only the clickable elements are clicked- Specified by:
clickin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>- Specified by:
clickin interfaceFluentList<E extends FluentWebElement>- Returns:
- the current instance of FluentList to provide capability for chaining calls
- See Also:
WebElement.click()
-
doubleClick
public FluentList<E> doubleClick()
Description copied from interface:FluentListdouble click on all elements on the list Only the clickable elements are clicked- Specified by:
doubleClickin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>- Specified by:
doubleClickin interfaceFluentList<E extends FluentWebElement>- Returns:
- the current instance of FluentList to provide capability for chaining calls
-
contextClick
public FluentList<E> contextClick()
Description copied from interface:FluentListcontext click on all elements on the list Only the clickable elements are clicked- Specified by:
contextClickin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>- Specified by:
contextClickin interfaceFluentList<E extends FluentWebElement>- Returns:
- the current instance of FluentList to provide capability for chaining calls
-
waitAndClick
public FluentList<E> waitAndClick()
Description copied from interface:FluentActionsHelper method that: a) waits at most 5 seconds for element b) scrolls centrally into it c) clicks on it- Specified by:
waitAndClickin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>- Returns:
- this object reference to chain methods calls
-
waitAndClick
public FluentList<E> waitAndClick(java.time.Duration duration)
Description copied from interface:FluentActionsHelper method that: a) waits for element b) scrolls centrally into it c) clicks on it- Specified by:
waitAndClickin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>- Parameters:
duration- - enabled to override default 5 seconds of waiting- Returns:
- this object reference to chain methods calls
-
write
public FluentList<E> write(java.lang.String... with)
Description copied from interface:FluentListFill all elements on the list with the corresponding cell in the with array. Only the visible elements are filled If there is 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>- Specified by:
writein interfaceFluentList<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:
WebElement.sendKeys(CharSequence...)
-
clearAll
public FluentList<E> clearAll()
Description copied from interface:FluentListClear all elements on the listOnly the visible elements are cleared.
- Specified by:
clearAllin interfaceFluentList<E extends FluentWebElement>- Returns:
- extended by FluentWebElement object
-
clearAllReactInputs
public FluentList<E> clearAllReactInputs()
Description copied from interface:FluentListClear all React elements on the listOnly the visible elements are cleared.
- Specified by:
clearAllReactInputsin interfaceFluentList<E extends FluentWebElement>- Returns:
- extended by FluentWebElement object
-
clearList
public void clearList()
Description copied from interface:FluentListCallsList.clear()from underlying List implementation.- Specified by:
clearListin interfaceFluentList<E extends FluentWebElement>- See Also:
List.clear()
-
each
public FluentListConditions each()
Description copied from interface:FluentListBuild a condition object on this element list that will match if each underlying element match.- Specified by:
eachin interfaceFluentList<E extends FluentWebElement>- Returns:
- a condition object
-
one
public FluentListConditions one()
Description copied from interface:FluentListBuild a condition object on this element list that will match if one or more underlying element match.- Specified by:
onein interfaceFluentList<E extends FluentWebElement>- Returns:
- a condition object
-
awaitUntilEach
public FluentListConditions awaitUntilEach()
Description copied from interface:FluentListBuild a condition object on this element list that will match if each underlying element match, automatically waiting for condition to be verified.- Specified by:
awaitUntilEachin interfaceFluentList<E extends FluentWebElement>- Returns:
- a condition object
-
awaitUntilOne
public FluentListConditions awaitUntilOne()
Description copied from interface:FluentListBuild a condition object on this element list that will match if one or more underlying element match, automatically waiting for condition to be verified.- Specified by:
awaitUntilOnein interfaceFluentList<E extends FluentWebElement>- Returns:
- a condition object
-
submit
public FluentList<E> submit()
Description copied from interface:FluentListsubmit on all elements on the list Only the visible elements are submitted- Specified by:
submitin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>- Specified by:
submitin interfaceFluentList<E extends FluentWebElement>- Returns:
- the current instance of FluentList to provide capability for chaining calls
- See Also:
WebElement.submit()
-
values
public java.util.List<java.lang.String> values()
Description copied from interface:FluentListReturn the value of elements on the list- Specified by:
valuesin interfaceFluentList<E extends FluentWebElement>- Returns:
- list of string values
-
ids
public java.util.List<java.lang.String> ids()
Description copied from interface:FluentListReturn the id of elements on the list- Specified by:
idsin interfaceFluentList<E extends FluentWebElement>- Returns:
- list of string values
-
attributes
public java.util.List<java.lang.String> attributes(java.lang.String attribute)
Description copied from interface:FluentListReturn a custom attribute of elements on the list- Specified by:
attributesin interfaceFluentList<E extends FluentWebElement>- Parameters:
attribute- attribute name- Returns:
- list of string values
-
names
public java.util.List<java.lang.String> names()
Description copied from interface:FluentListReturn the name of elements on the list- Specified by:
namesin interfaceFluentList<E extends FluentWebElement>- Returns:
- list of string values
-
dimensions
public java.util.List<org.openqa.selenium.Dimension> dimensions()
Description copied from interface:FluentListReturn the Dimension of elements on the list- Specified by:
dimensionsin interfaceFluentList<E extends FluentWebElement>- Returns:
- list of Dimensions
-
tagNames
public java.util.List<java.lang.String> tagNames()
Description copied from interface:FluentListReturn the tag name of elements on the list- Specified by:
tagNamesin interfaceFluentList<E extends FluentWebElement>- Returns:
- list of string values
-
textContents
public java.util.List<java.lang.String> textContents()
Description copied from interface:FluentListReturn the text contents of list elements- Specified by:
textContentsin interfaceFluentList<E extends FluentWebElement>- Returns:
- list of string values
-
texts
public java.util.List<java.lang.String> texts()
Description copied from interface:FluentListReturn the texts of list elements- Specified by:
textsin interfaceFluentList<E extends FluentWebElement>- Returns:
- list of string values
-
find
public FluentList<E> find(java.util.List<org.openqa.selenium.WebElement> rawElements)
Description copied from interface:SearchControlWrap raw selenium elements into a list of elements.- Specified by:
findin interfaceSearchControl<E extends FluentWebElement>- Parameters:
rawElements- raw selenium elements- Returns:
- list of element
-
$
public FluentList<E> $(java.util.List<org.openqa.selenium.WebElement> rawElements)
Description copied from interface:SearchControlWrap raw selenium elements into a list of elements.- Specified by:
$in interfaceSearchControl<E extends FluentWebElement>- Parameters:
rawElements- raw selenium elements- Returns:
- list of element
-
el
public E el(org.openqa.selenium.WebElement rawElement)
Description copied from interface:SearchControlWrap existing raw selenium element into an element.- Specified by:
elin interfaceSearchControl<E extends FluentWebElement>- Parameters:
rawElement- raw selenium element- Returns:
- element
-
find
public FluentList<E> find(java.lang.String selector, SearchFilter... filters)
Description copied from interface:FluentListfind elements into the children with the corresponding filters- Specified by:
findin interfaceFluentList<E extends FluentWebElement>- Specified by:
findin interfaceSearchControl<E extends FluentWebElement>- Parameters:
selector- element namefilters- set of filters- Returns:
- extended by FluentWebElement objects list
-
find
public FluentList<E> find(org.openqa.selenium.By locator, SearchFilter... filters)
Description copied from interface:SearchControlFind list of elements with Selenium locator and filters.- Specified by:
findin interfaceSearchControl<E extends FluentWebElement>- Parameters:
locator- elements locatorfilters- filters set- Returns:
- list of elements
-
find
public FluentList<E> find(SearchFilter... filters)
Description copied from interface:FluentListfind elements in the children with the corresponding filters- Specified by:
findin interfaceFluentList<E extends FluentWebElement>- Specified by:
findin interfaceSearchControl<E extends FluentWebElement>- Parameters:
filters- set of filters- Returns:
- extended by FluentWebElement objects list
-
fill
public Fill fill()
Description copied from interface:FluentActionsConstruct a Fill Builder in order to allow easy fill of visible input fields.- Specified by:
fillin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>- Returns:
- Fill builder
-
fillSelect
public FillSelect fillSelect()
Description copied from interface:FluentActionsConstruct a Fill Select Builder in order to allow easy fill of visible input fields.- Specified by:
fillSelectin interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>- Returns:
- Fill select builder
-
frame
public FluentList<E> frame()
Description copied from interface:FluentActionsSelect a frame using this element.- Specified by:
framein interfaceFluentActions<FluentList<E extends FluentWebElement>,E extends FluentWebElement>- Returns:
- this object reference to chain methods calls.
-
optional
public java.util.Optional<FluentList<E>> optional()
Description copied from interface:FluentProxyStateBuilds an optional. If underlying element is lazy, search will be perfomed when invoking this method.- Specified by:
optionalin interfaceFluentProxyState<E extends FluentWebElement>- Returns:
- An optional wrapping this.
- See Also:
FluentProxyState.present(),FluentProxyState.now()
-
as
public <T extends FluentWebElement> FluentList<T> as(java.lang.Class<T> componentClass)
Description copied from interface:FluentListWrap all underlying elements in a component.- Specified by:
asin interfaceFluentList<E extends FluentWebElement>- Type Parameters:
T- type of component- Parameters:
componentClass- component class- Returns:
- fluent list of elements as components.
-
clear
public void clear()
Description copied from interface:FluentListClear visible elements on the list- Specified by:
clearin interfacejava.util.Collection<E extends FluentWebElement>- Specified by:
clearin interfaceFluentList<E extends FluentWebElement>- Specified by:
clearin interfacejava.util.List<E extends FluentWebElement>- Overrides:
clearin classListImpl<E extends FluentWebElement>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
withLabel
public FluentList<E> withLabel(java.lang.String label)
Description copied from interface:FluentLabelApply a label that will be displayed as the representation of this object for error message.- Specified by:
withLabelin interfaceFluentLabel<E extends FluentWebElement>- Parameters:
label- label to use- Returns:
- reference to this object to chain calls
-
withLabelHint
public FluentList<E> withLabelHint(java.lang.String... labelHint)
Description copied from interface:FluentLabelAdd a label hint that will be appended to the representation of this object for error message.- Specified by:
withLabelHintin interfaceFluentLabel<E extends FluentWebElement>- Parameters:
labelHint- label hints to add- Returns:
- reference to this object to chain calls
-
noHookInstance
public FluentList<E> noHookInstance()
Description copied from interface:HookControlCreates a new element locator instance with all hooks disabled.- Specified by:
noHookInstancein interfaceHookControl<E extends FluentWebElement>- Returns:
- new element locator with hook disabled.
-
noHook
public FluentList<E> noHook()
Description copied from interface:HookControlDisable all hooks from actual element.- Specified by:
noHookin interfaceHookControl<E extends FluentWebElement>- Returns:
- this object reference to chain calls
-
withHook
public <O,H extends FluentHook<O>> FluentList<E> withHook(java.lang.Class<H> hook)
Description copied from interface:HookControlEnable a hook with default options.- Specified by:
withHookin interfaceHookControl<E extends FluentWebElement>- Type Parameters:
O- Type of the hookH- Type of the hook options- Parameters:
hook- hook class to enable- Returns:
- this object reference to chain calls
-
noHook
public <R> R noHook(java.lang.Class<? extends FluentHook> hook, java.util.function.Function<FluentList<E>,R> function)
Description copied from interface:HookControlInvoke a function with no hook.- Specified by:
noHookin interfaceHookControl<E extends FluentWebElement>- Type Parameters:
R- return type- Parameters:
hook- hook class to disablefunction- function to invoke- Returns:
- return value of the given function
-
restoreHooks
public FluentList<E> restoreHooks()
Description copied from interface:HookControlRetore hooks that were defined initially.- Specified by:
restoreHooksin interfaceHookControl<E extends FluentWebElement>- Returns:
- this object reference to chain calls
-
withHook
public <O,H extends FluentHook<O>> FluentList<E> withHook(java.lang.Class<H> hook, O options)
Description copied from interface:HookControlEnable a hook with given options.- Specified by:
withHookin interfaceHookControl<E extends FluentWebElement>- Type Parameters:
O- Type of the hookH- Type of the hook options- Parameters:
hook- hook class to enableoptions- hook options to apply- Returns:
- this object reference to chain calls
-
noHook
public FluentList<E> noHook(java.lang.Class<? extends FluentHook>... hooks)
Description copied from interface:HookControlDisable given hook from actual element.- Specified by:
noHookin interfaceHookControl<E extends FluentWebElement>- Parameters:
hooks- hook classes to disable- Returns:
- this object reference to chain calls
-
noHookInstance
public FluentList<E> noHookInstance(java.lang.Class<? extends FluentHook>... hooks)
Description copied from interface:HookControlCreates a new element locator instance with given hook disabled.- Specified by:
noHookInstancein interfaceHookControl<E extends FluentWebElement>- Parameters:
hooks- hook classes to disable- Returns:
- new element locator with hook disabled.
-
noHook
public <R> R noHook(java.util.function.Function<FluentList<E>,R> function)
Description copied from interface:HookControlInvoke a function with no hook.- Specified by:
noHookin interfaceHookControl<E extends FluentWebElement>- Type Parameters:
R- return type- Parameters:
function- function to invoke- Returns:
- return value of the given function
-
scrollToCenter
public FluentList<E> scrollToCenter()
Scrolls to first element of list- Specified by:
scrollToCenterin interfaceFluentJavascriptActions<E extends FluentWebElement>- Returns:
- this object reference to chain methods calls
-
scrollIntoView
public FluentList<E> scrollIntoView(boolean alignWithTop)
Scrolls to first element of list- Specified by:
scrollIntoViewin interfaceFluentJavascriptActions<E extends FluentWebElement>- Parameters:
alignWithTop- If true, the top of the element will be aligned to the top of the visible area of the scrollable ancestor. If false, the bottom of the element will be aligned to the bottom of the visible area of the scrollable ancestor.- Returns:
- this object reference to chain methods calls
- See Also:
- element.scrollIntoView
-
modifyAttribute
public FluentList<E> modifyAttribute(java.lang.String attributeName, java.lang.String attributeValue)
Modifies attributes of first element only- Specified by:
modifyAttributein interfaceFluentJavascriptActions<E extends FluentWebElement>- Parameters:
attributeName- attribute to be changeattributeValue- new attribute value- Returns:
- this object reference to chain methods calls
-
scrollIntoView
public FluentList<E> scrollIntoView()
Scrolls to first element of list- Specified by:
scrollIntoViewin interfaceFluentJavascriptActions<E extends FluentWebElement>- Returns:
- this object reference to chain methods calls
- See Also:
- element.scrollIntoView
-
-