Class AbstractListItemHandler<T>
java.lang.Object
net.thucydides.core.annotations.locators.AbstractListItemHandler<T>
- Type Parameters:
T- the target interface
- All Implemented Interfaces:
java.lang.reflect.InvocationHandler
- Direct Known Subclasses:
WebElementFacadeListItemHandler,WidgetListItemHandler
public abstract class AbstractListItemHandler<T>
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
Similar to
SmartElementHandler but wraps a concrete WebElement
instead of an ElementLocator.- Author:
- Joe Nasca
-
Field Summary
Fields Modifier and Type Field Description protected org.openqa.selenium.WebElementelementprotected java.lang.Class<?>implementerClassprotected longimplicitTimeoutInMillisecondsprotected org.openqa.selenium.support.pagefactory.ElementLocatorlocatorprotected PageObjectpageprotected longwaitForTimeoutInMilliseconds -
Constructor Summary
Constructors Constructor Description AbstractListItemHandler(java.lang.Class<T> targetInterface, java.lang.Class<?> interfaceType, org.openqa.selenium.support.pagefactory.ElementLocator locator, org.openqa.selenium.WebElement element, PageObject page, long implicitTimeoutInMilliseconds, long waitForTimeoutInMilliseconds)Constructor. -
Method Summary
Modifier and Type Method Description java.lang.Objectinvoke(java.lang.Object object, java.lang.reflect.Method method, java.lang.Object[] objects)protected abstract java.lang.ObjectnewElementInstance()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
locator
protected final org.openqa.selenium.support.pagefactory.ElementLocator locator -
element
protected final org.openqa.selenium.WebElement element -
page
-
implementerClass
protected final java.lang.Class<?> implementerClass -
implicitTimeoutInMilliseconds
protected final long implicitTimeoutInMilliseconds -
waitForTimeoutInMilliseconds
protected final long waitForTimeoutInMilliseconds
-
-
Constructor Details
-
AbstractListItemHandler
public AbstractListItemHandler(java.lang.Class<T> targetInterface, java.lang.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 Details
-
invoke
public java.lang.Object invoke(java.lang.Object object, java.lang.reflect.Method method, java.lang.Object[] objects) throws java.lang.Throwable- Specified by:
invokein interfacejava.lang.reflect.InvocationHandler- Throws:
java.lang.Throwable
-
newElementInstance
protected abstract java.lang.Object newElementInstance() throws java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException- Throws:
java.lang.NoSuchMethodExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetException
-