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.WebElement element  
    protected java.lang.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​(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.Object invoke​(java.lang.Object object, java.lang.reflect.Method method, java.lang.Object[] objects)  
    protected abstract java.lang.Object newElementInstance()  

    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

      protected final PageObject 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 WebElementFacade
      locator - 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:
      invoke in interface java.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.NoSuchMethodException
      java.lang.InstantiationException
      java.lang.IllegalAccessException
      java.lang.reflect.InvocationTargetException