Stay organized with collections Save and categorize content based on your preferences.

RemoteInteraction

public 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

default static final String
BUNDLE_EXECUTION_STATUS = "executionStatus"

Public methods

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

Creates a callable to run Espresso check interaction on remote processes

abstract Callable<Void>
createRemotePerformCallable(
    Matcher<Root> rootMatcher,
    Matcher<View> viewMatcher,
    Map<String, IBinder> iBinders,
    ViewAction[] viewActions
)

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

abstract boolean

Constants

BUNDLE_EXECUTION_STATUS

default static final String BUNDLE_EXECUTION_STATUS = "executionStatus"

Public methods

createRemoteCheckCallable

abstract Callable<VoidcreateRemoteCheckCallable(
    Matcher<Root> rootMatcher,
    Matcher<View> viewMatcher,
    Map<String, IBinder> iBinders,
    ViewAssertion viewAssert
)

Creates a callable to run Espresso check interaction on remote processes

The caller is expected to schedule the task to run.

Parameters
Matcher<Root> rootMatcher

the root matcher to use.

Matcher<View> viewMatcher

the view matcher to use.

Map<String, IBinder> iBinders

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

Returns
Callable<Void>

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

createRemotePerformCallable

abstract Callable<VoidcreateRemotePerformCallable(
    Matcher<Root> rootMatcher,
    Matcher<View> viewMatcher,
    Map<String, IBinder> iBinders,
    ViewAction[] viewActions
)

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
Matcher<Root> rootMatcher

the root matcher to use.

Matcher<View> viewMatcher

the view matcher to use.

Map<String, IBinder> iBinders

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

ViewAction[] viewActions

one or more actions to execute.

Returns
Callable<Void>

a Callable that performs the action.

isRemoteProcess

abstract boolean isRemoteProcess()
Returns
boolean

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