Package io.appium.java_client.android
Interface ListensToLogcatMessages
-
- All Superinterfaces:
ExecutesMethod
- All Known Implementing Classes:
AndroidDriver
public interface ListensToLogcatMessages extends ExecutesMethod
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addLogcatConnectionListener(java.lang.Runnable handler)
Adds a new log broadcasting connection handler.default void
addLogcatDisconnectionListener(java.lang.Runnable handler)
Adds a new log broadcasting disconnection handler.default void
addLogcatErrorsListener(java.util.function.Consumer<java.lang.Throwable> handler)
Adds a new log broadcasting errors handler.default void
addLogcatMessagesListener(java.util.function.Consumer<java.lang.String> handler)
Adds a new log messages broadcasting handler.StringWebSocketClient
getLogcatClient()
default void
removeAllLogcatListeners()
Removes all existing logcat handlers.default void
startLogcatBroadcast()
Start logcat messages broadcast via web socket.default void
startLogcatBroadcast(java.lang.String host)
Start logcat messages broadcast via web socket.default void
startLogcatBroadcast(java.lang.String host, int port)
Start logcat messages broadcast via web socket.default void
stopLogcatBroadcast()
Stops logcat messages broadcast via web socket.-
Methods inherited from interface io.appium.java_client.ExecutesMethod
execute, execute
-
-
-
-
Method Detail
-
getLogcatClient
StringWebSocketClient getLogcatClient()
-
startLogcatBroadcast
default void startLogcatBroadcast()
Start logcat messages broadcast via web socket. This method assumes that Appium server is running on localhost and is assigned to the default port (4723).
-
startLogcatBroadcast
default void startLogcatBroadcast(java.lang.String host)
Start logcat messages broadcast via web socket. This method assumes that Appium server is assigned to the default port (4723).- Parameters:
host
- the name of the host where Appium server is running
-
startLogcatBroadcast
default void startLogcatBroadcast(java.lang.String host, int port)
Start logcat messages broadcast via web socket.- Parameters:
host
- the name of the host where Appium server is runningport
- the port of the host where Appium server is running
-
addLogcatMessagesListener
default void addLogcatMessagesListener(java.util.function.Consumer<java.lang.String> handler)
Adds a new log messages broadcasting handler. Several handlers might be assigned to a single server. Multiple calls to this method will cause such handler to be called multiple times.- Parameters:
handler
- a function, which accepts a single argument, which is the actual log message
-
addLogcatErrorsListener
default void addLogcatErrorsListener(java.util.function.Consumer<java.lang.Throwable> handler)
Adds a new log broadcasting errors handler. Several handlers might be assigned to a single server. Multiple calls to this method will cause such handler to be called multiple times.- Parameters:
handler
- a function, which accepts a single argument, which is the actual exception instance
-
addLogcatConnectionListener
default void addLogcatConnectionListener(java.lang.Runnable handler)
Adds a new log broadcasting connection handler. Several handlers might be assigned to a single server. Multiple calls to this method will cause such handler to be called multiple times.- Parameters:
handler
- a function, which is executed as soon as the client is successfully connected to the web socket
-
addLogcatDisconnectionListener
default void addLogcatDisconnectionListener(java.lang.Runnable handler)
Adds a new log broadcasting disconnection handler. Several handlers might be assigned to a single server. Multiple calls to this method will cause such handler to be called multiple times.- Parameters:
handler
- a function, which is executed as soon as the client is successfully disconnected from the web socket
-
removeAllLogcatListeners
default void removeAllLogcatListeners()
Removes all existing logcat handlers.
-
stopLogcatBroadcast
default void stopLogcatBroadcast()
Stops logcat messages broadcast via web socket.
-
-