Class WidgetInterceptor
java.lang.Object
io.appium.java_client.pagefactory.interceptors.InterceptorOfASingleElement
io.appium.java_client.pagefactory.WidgetInterceptor
- All Implemented Interfaces:
MethodCallListener
-
Field Summary
Fields inherited from class io.appium.java_client.pagefactory.interceptors.InterceptorOfASingleElement
locatorFields inherited from interface io.appium.java_client.proxy.MethodCallListener
UNSET -
Constructor Summary
ConstructorsConstructorDescriptionWidgetInterceptor(@Nullable CacheableLocator locator, WeakReference<org.openqa.selenium.WebDriver> driverReference, @Nullable WeakReference<org.openqa.selenium.WebElement> cachedElementReference, Map<ContentType, Constructor<? extends Widget>> instantiationMap, Duration duration) Proxy interceptor class for widgets. -
Method Summary
Modifier and TypeMethodDescriptionOverride this callback in order to change/customize the behavior of a single or multiple methods.protected ObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.appium.java_client.proxy.MethodCallListener
afterCall, beforeCall, onError
-
Constructor Details
-
WidgetInterceptor
public WidgetInterceptor(@Nullable CacheableLocator locator, WeakReference<org.openqa.selenium.WebDriver> driverReference, @Nullable WeakReference<org.openqa.selenium.WebElement> cachedElementReference, Map<ContentType, Constructor<? extends Widget>> instantiationMap, Duration duration) Proxy interceptor class for widgets.
-
-
Method Details
-
getObject
protected Object getObject(org.openqa.selenium.WebElement element, Method method, Object[] args) throws Throwable - Specified by:
getObjectin classInterceptorOfASingleElement- Throws:
Throwable
-
call
Description copied from interface:MethodCallListenerOverride 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:
callin interfaceMethodCallListener- Overrides:
callin classInterceptorOfASingleElement- Parameters:
obj- The proxy instancemethod- Method to be replacedargs- Array of method argumentsoriginal- 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
-