Class InterceptorOfASingleElement

java.lang.Object
io.appium.java_client.pagefactory.interceptors.InterceptorOfASingleElement
All Implemented Interfaces:
MethodCallListener
Direct Known Subclasses:
ElementInterceptor, WidgetInterceptor

public abstract class InterceptorOfASingleElement extends Object implements MethodCallListener
  • Field Details

    • locator

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

    • InterceptorOfASingleElement

      public InterceptorOfASingleElement(@Nullable org.openqa.selenium.support.pagefactory.ElementLocator locator, WeakReference<org.openqa.selenium.WebDriver> driverReference)
  • Method Details

    • getObject

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

      public Object call(Object obj, Method method, Object[] args, Callable<?> original) throws 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:
      Throwable