Class InterceptorOfASingleElement

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.openqa.selenium.support.pagefactory.ElementLocator locator  
    • Constructor Summary

      Constructors 
      Constructor Description
      InterceptorOfASingleElement​(org.openqa.selenium.support.pagefactory.ElementLocator locator, java.lang.ref.WeakReference<org.openqa.selenium.WebDriver> driverReference)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object call​(java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object[] args, java.util.concurrent.Callable<?> original)
      Override this callback in order to change/customize the behavior of a single or multiple methods.
      protected abstract java.lang.Object getObject​(org.openqa.selenium.WebElement element, java.lang.reflect.Method method, java.lang.Object[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • locator

        protected final org.openqa.selenium.support.pagefactory.ElementLocator locator
    • Constructor Detail

      • InterceptorOfASingleElement

        public InterceptorOfASingleElement​(@Nullable
                                           org.openqa.selenium.support.pagefactory.ElementLocator locator,
                                           java.lang.ref.WeakReference<org.openqa.selenium.WebDriver> driverReference)
    • Method Detail

      • getObject

        protected abstract java.lang.Object getObject​(org.openqa.selenium.WebElement element,
                                                      java.lang.reflect.Method method,
                                                      java.lang.Object[] args)
                                               throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • call

        public java.lang.Object call​(java.lang.Object obj,
                                     java.lang.reflect.Method method,
                                     java.lang.Object[] args,
                                     java.util.concurrent.Callable<?> original)
                              throws java.lang.Throwable
        Description copied from interface: MethodCallListener
        Override this callback in order to change/customize the behavior of a single or multiple methods. The original method result will be replaced with the result returned by this callback. Also, any exception thrown by it will replace original method(s) exception.
        Specified by:
        call in interface MethodCallListener
        Parameters:
        obj - The proxy instance
        method - Method to be replaced
        args - Array of method arguments
        original - The reference to the original method in case it is necessary to instrument its result.
        Returns:
        The type of the returned result should be castable to the returned type of the original method.
        Throws:
        java.lang.Throwable