Package io.appium.java_client.proxy
Interface ProxyAwareListener
- All Superinterfaces:
MethodCallListener
- All Known Implementing Classes:
ElementAwareWebDriverListener
Extension of
MethodCallListener that allows access to the proxy instance it depends on.
This interface is intended for listeners that need a reference to the proxy object.
The attachProxyInstance(Object) method will be invoked immediately after the proxy is created,
allowing the listener to bind to it before any method interception begins.
Example usage: Working with elements such as
RemoteWebElement that require runtime mutation (e.g. setting parent driver or element ID).
-
Field Summary
Fields inherited from interface io.appium.java_client.proxy.MethodCallListener
UNSET -
Method Summary
Modifier and TypeMethodDescriptionvoidattachProxyInstance(Object proxy) Binds the listener to the proxy instance passed.Methods inherited from interface io.appium.java_client.proxy.MethodCallListener
afterCall, beforeCall, call, onError
-
Method Details
-
attachProxyInstance
Binds the listener to the proxy instance passed.This is called once, immediately after proxy creation and before the proxy is returned to the caller.
- Parameters:
proxy- the proxy instance created viacreateProxythat this listener is attached to.
-