Package io.fluentlenium.core.proxy
Class ComponentHandler
java.lang.Object
io.fluentlenium.core.proxy.AbstractLocatorHandler<T>
io.fluentlenium.core.proxy.AbstractLocatorAndInvocationHandler<org.openqa.selenium.WebElement>
io.fluentlenium.core.proxy.ComponentHandler
- All Implemented Interfaces:
LocatorHandler<org.openqa.selenium.WebElement>,LocatorStatusHandler,InvocationHandler
public class ComponentHandler
extends AbstractLocatorAndInvocationHandler<org.openqa.selenium.WebElement>
Proxy handler for
WebElement.-
Field Summary
Fields inherited from class io.fluentlenium.core.proxy.AbstractLocatorHandler
hookChainBuilder, hookDefinitions, hooks, locator, proxy, result -
Constructor Summary
ConstructorsConstructorDescriptionComponentHandler(org.openqa.selenium.support.pagefactory.ElementLocator locator) Creates a new component handler -
Method Summary
Modifier and TypeMethodDescriptionorg.openqa.selenium.WebElementGet the underlying element.org.openqa.selenium.WebElementgetInvocationTarget(Method method) Retrieve the invocation target of this proxy handler.org.openqa.selenium.WebElementGet the actual result of the locator.Retrieve the message context from this proxy locator.protected booleanisStale()Get the stale status of the element.protected List<org.openqa.selenium.WebElement>resultToList(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, getLazyToString, getLocator, getLocatorResult, loaded, present, 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
-
ComponentHandler
public ComponentHandler(org.openqa.selenium.support.pagefactory.ElementLocator locator) Creates a new component handler- Parameters:
locator- element locator for this component
-
-
Method Details
-
getMessageContext
Description copied from interface:LocatorHandlerRetrieve the message context from this proxy locator.- Returns:
- message context
-
resultToList
Description copied from class:AbstractLocatorHandlerConvert result to a list of selenium element.- Specified by:
resultToListin classAbstractLocatorHandler<org.openqa.selenium.WebElement>- Parameters:
result- found result- Returns:
- list of selenium element
-
isStale
protected boolean isStale()Description copied from class:AbstractLocatorHandlerGet the stale status of the element.- Specified by:
isStalein classAbstractLocatorHandler<org.openqa.selenium.WebElement>- Returns:
- true if element is stale, false otherwise
-
getElement
public org.openqa.selenium.WebElement getElement()Description copied from class:AbstractLocatorHandlerGet the underlying element.- Specified by:
getElementin classAbstractLocatorHandler<org.openqa.selenium.WebElement>- Returns:
- underlying element
-
getLocatorResultImpl
public org.openqa.selenium.WebElement getLocatorResultImpl()Description copied from class:AbstractLocatorHandlerGet the actual result of the locator.- Specified by:
getLocatorResultImplin classAbstractLocatorHandler<org.openqa.selenium.WebElement>- Returns:
- result of the locator
-
getInvocationTarget
Description copied from interface:LocatorHandlerRetrieve the invocation target of this proxy handler.- Parameters:
method- method to invoke- Returns:
- invocation target
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Overrides:
invokein classAbstractLocatorAndInvocationHandler<org.openqa.selenium.WebElement>- Throws:
Throwable
-