Class AbstractListItemHandler<T>
- java.lang.Object
-
- net.thucydides.core.annotations.locators.AbstractListItemHandler<T>
-
- Type Parameters:
T
- the target interface
- All Implemented Interfaces:
InvocationHandler
- Direct Known Subclasses:
WebElementFacadeListItemHandler
,WidgetListItemHandler
public abstract class AbstractListItemHandler<T> extends Object implements InvocationHandler
Similar toSmartElementHandler
but wraps a concrete WebElement instead of an ElementLocator.- Author:
- Joe Nasca
-
-
Field Summary
Fields Modifier and Type Field Description protected org.openqa.selenium.WebElement
element
protected Class<?>
implementerClass
protected long
implicitTimeoutInMilliseconds
protected org.openqa.selenium.support.pagefactory.ElementLocator
locator
protected PageObject
page
protected long
waitForTimeoutInMilliseconds
-
Constructor Summary
Constructors Constructor Description AbstractListItemHandler(Class<T> targetInterface, Class<?> interfaceType, org.openqa.selenium.support.pagefactory.ElementLocator locator, org.openqa.selenium.WebElement element, PageObject page, long implicitTimeoutInMilliseconds, long waitForTimeoutInMilliseconds)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Object
invoke(Object object, Method method, Object[] objects)
protected abstract Object
newElementInstance()
-
-
-
Field Detail
-
locator
protected final org.openqa.selenium.support.pagefactory.ElementLocator locator
-
element
protected final org.openqa.selenium.WebElement element
-
page
protected final PageObject page
-
implementerClass
protected final Class<?> implementerClass
-
implicitTimeoutInMilliseconds
protected final long implicitTimeoutInMilliseconds
-
waitForTimeoutInMilliseconds
protected final long waitForTimeoutInMilliseconds
-
-
Constructor Detail
-
AbstractListItemHandler
public AbstractListItemHandler(Class<T> targetInterface, Class<?> interfaceType, org.openqa.selenium.support.pagefactory.ElementLocator locator, org.openqa.selenium.WebElement element, PageObject page, long implicitTimeoutInMilliseconds, long waitForTimeoutInMilliseconds)
Constructor.- Parameters:
targetInterface
- usually WidgetObject or WebElementFacadelocator
- the locator of the List containing this element
-
-
Method Detail
-
invoke
public Object invoke(Object object, Method method, Object[] objects) throws Throwable
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
newElementInstance
protected abstract Object newElementInstance() throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException
-
-