Package io.fluentlenium.core.proxy
Class ListHandler
java.lang.Object
io.fluentlenium.core.proxy.AbstractLocatorHandler<T>
io.fluentlenium.core.proxy.AbstractLocatorAndInvocationHandler<List<org.openqa.selenium.WebElement>>
io.fluentlenium.core.proxy.ListHandler
- All Implemented Interfaces:
LocatorHandler<List<org.openqa.selenium.WebElement>>,LocatorStatusHandler,InvocationHandler
public class ListHandler
extends AbstractLocatorAndInvocationHandler<List<org.openqa.selenium.WebElement>>
Proxy handler for list of
WebElement.-
Field Summary
Fields inherited from class io.fluentlenium.core.proxy.AbstractLocatorHandler
hookChainBuilder, hookDefinitions, hooks, locator, proxy, result -
Constructor Summary
ConstructorsConstructorDescriptionListHandler(org.openqa.selenium.support.pagefactory.ElementLocator locator) Creates a new proxy handler for elements. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.openqa.selenium.WebElementGet the underlying element.List<org.openqa.selenium.WebElement>getInvocationTarget(Method method) Retrieve the invocation target of this proxy handler.protected StringGet string representation of not already found element.List<org.openqa.selenium.WebElement>Get the actual result of the locator.Retrieve the message context from this proxy locator.protected booleanisStale()Get the stale status of the element.booleanpresent()Check if the result is present.protected List<org.openqa.selenium.WebElement>resultToList(List<org.openqa.selenium.WebElement> result) Convert result to a list of selenium element.Methods inherited from class io.fluentlenium.core.proxy.AbstractLocatorAndInvocationHandler
equals, hashCode, toStringMethods inherited from class io.fluentlenium.core.proxy.AbstractLocatorHandler
addListener, fireProxyElementFound, fireProxyElementSearch, getHookLocator, getLocator, getLocatorResult, loaded, proxyToString, removeListener, reset, setHooks, setProxyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.fluentlenium.core.proxy.LocatorHandler
noSuchElement, now
-
Constructor Details
-
ListHandler
public ListHandler(org.openqa.selenium.support.pagefactory.ElementLocator locator) Creates a new proxy handler for elements.- Parameters:
locator- elements locator
-
-
Method Details
-
getMessageContext
Description copied from interface:LocatorHandlerRetrieve the message context from this proxy locator.- Returns:
- message context
-
resultToList
protected List<org.openqa.selenium.WebElement> resultToList(List<org.openqa.selenium.WebElement> result) Description copied from class:AbstractLocatorHandlerConvert result to a list of selenium element.- Specified by:
resultToListin classAbstractLocatorHandler<List<org.openqa.selenium.WebElement>>- Parameters:
result- found result- Returns:
- list of selenium element
-
getElement
protected org.openqa.selenium.WebElement getElement()Description copied from class:AbstractLocatorHandlerGet the underlying element.- Specified by:
getElementin classAbstractLocatorHandler<List<org.openqa.selenium.WebElement>>- Returns:
- underlying element
-
getInvocationTarget
Description copied from interface:LocatorHandlerRetrieve the invocation target of this proxy handler.- Parameters:
method- method to invoke- Returns:
- invocation target
-
present
public boolean present()Description copied from interface:LocatorStatusHandlerCheck if the result is present.- Specified by:
presentin interfaceLocatorStatusHandler- Overrides:
presentin classAbstractLocatorHandler<List<org.openqa.selenium.WebElement>>- Returns:
- true if result is present, false otherwise
-
isStale
protected boolean isStale()Description copied from class:AbstractLocatorHandlerGet the stale status of the element.- Specified by:
isStalein classAbstractLocatorHandler<List<org.openqa.selenium.WebElement>>- Returns:
- true if element is stale, false otherwise
-
getLocatorResultImpl
Description copied from class:AbstractLocatorHandlerGet the actual result of the locator.- Specified by:
getLocatorResultImplin classAbstractLocatorHandler<List<org.openqa.selenium.WebElement>>- Returns:
- result of the locator
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Overrides:
invokein classAbstractLocatorAndInvocationHandler<List<org.openqa.selenium.WebElement>>- Throws:
Throwable
-
getLazyToString
Description copied from class:AbstractLocatorHandlerGet string representation of not already found element.- Overrides:
getLazyToStringin classAbstractLocatorHandler<List<org.openqa.selenium.WebElement>>- Returns:
- string representation of not already found element
-