interface RemoteInteraction

Known direct subclasses
EspressoRemote

A singleton class that facilitates communication between other Espresso instance that may be running in different processes.

NoopRemoteInteraction

Noop RemoteInteraction object


Facilitates communication between other Espresso instance that may be running in different processes.

Summary

Constants

const String!
BUNDLE_EXECUTION_STATUS = "executionStatus"

Public functions

Callable<Void!>!
createRemoteCheckCallable(
    rootMatcher: Matcher<Root!>!,
    viewMatcher: Matcher<View!>!,
    iBinders: (Mutable)Map<String!, IBinder!>!,
    viewAssert: ViewAssertion!
)

Creates a callable to run Espresso check interaction on remote processes

Callable<Void!>!
createRemotePerformCallable(
    rootMatcher: Matcher<Root!>!,
    viewMatcher: Matcher<View!>!,
    iBinders: (Mutable)Map<String!, IBinder!>!,
    viewActions: Array<ViewAction!>!
)

Creates a callable to run a perform interaction on remote processes.

Boolean

Returns {code true} if the current Espresso instance is communicating with another Espresso instance in a remote process.

Boolean

Returns true if the current Espresso instance running in a remote process.

Constants

BUNDLE_EXECUTION_STATUS

const val BUNDLE_EXECUTION_STATUS = "executionStatus": String!

Public functions

createRemoteCheckCallable

fun createRemoteCheckCallable(
    rootMatcher: Matcher<Root!>!,
    viewMatcher: Matcher<View!>!,
    iBinders: (Mutable)Map<String!, IBinder!>!,
    viewAssert: ViewAssertion!
): Callable<Void!>!

Creates a callable to run Espresso check interaction on remote processes

The caller is expected to schedule the task to run.

Parameters
rootMatcher: Matcher<Root!>!

the root matcher to use.

viewMatcher: Matcher<View!>!

the view matcher to use.

iBinders: (Mutable)Map<String!, IBinder!>!

a list of binders to pass along to the remote process instance

viewAssert: ViewAssertion!

the view assertion to use.

Returns
Callable<Void!>!

a Callable that will perform the check pending completion of the task.

createRemotePerformCallable

fun createRemotePerformCallable(
    rootMatcher: Matcher<Root!>!,
    viewMatcher: Matcher<View!>!,
    iBinders: (Mutable)Map<String!, IBinder!>!,
    viewActions: Array<ViewAction!>!
): Callable<Void!>!

Creates a callable to run a perform interaction on remote processes.

If there no remote Espresso currently running in a timely manner the interaction will not be executed and a NoRemoteEspressoInstanceException will be thrown.

Parameters
rootMatcher: Matcher<Root!>!

the root matcher to use.

viewMatcher: Matcher<View!>!

the view matcher to use.

iBinders: (Mutable)Map<String!, IBinder!>!

a list of binders to pass along to the remote process instance

viewActions: Array<ViewAction!>!

one or more actions to execute.

Returns
Callable<Void!>!

a Callable that performs the action.

isRemoteClient

fun isRemoteClient(): Boolean

Returns {code true} if the current Espresso instance is communicating with another Espresso instance in a remote process.

isRemoteProcess

fun isRemoteProcess(): Boolean

Returns true if the current Espresso instance running in a remote process.