public final class

AtomAction

extends Object
implements ViewAction Bindable
java.lang.Object
   ↳ androidx.test.espresso.web.action.AtomAction<E>

Class Overview

A ViewAction which causes the provided Atom to be evaluated within a webview.

It is not recommended to use AtomAction directly.

Instead for examples of how to interact with a WebView's content through Atoms.

If you must use AtomAction directly, take care to remember that they are Stateful (unlike most ViewActions) and the caller must call get() to ensure that the action has completed.

See also:

Summary

Public Constructors
AtomAction(Atom<E> atom, WindowReference window, ElementReference element)
Creates an AtomAction.
Public Methods
E get(long val, TimeUnit unit)
Blocks until the atom has completed execution with a configurable timeout.
E get()
Blocks until the atom has completed execution.
Matcher<View> getConstraints()
String getDescription()
Future<E> getFuture()
Return a Future, which will be set and transformed from futureEval.
IBinder getIBinder()
String getId()
void perform(UiController controller, View view)
void setIBinder(IBinder binder)
[Expand]
Inherited Methods
From class java.lang.Object
From interface androidx.test.espresso.ViewAction
From interface androidx.test.espresso.remote.Bindable

Public Constructors

public AtomAction (Atom<E> atom, WindowReference window, ElementReference element)

Creates an AtomAction.

Parameters
atom Atom: the atom to execute
window WindowReference: (optional/nullable) the window context to execute on.
element ElementReference: (optional/nullable) the element to execute on.

Public Methods

public E get (long val, TimeUnit unit)

Blocks until the atom has completed execution with a configurable timeout.

Parameters
val long
unit TimeUnit
Returns
E
Throws
ExecutionException
InterruptedException
TimeoutException

public E get ()

Blocks until the atom has completed execution.

Returns
E
Throws
ExecutionException
InterruptedException

public Matcher<View> getConstraints ()

Returns
Matcher<View>

public String getDescription ()

Returns
String

public Future<E> getFuture ()

Return a Future, which will be set and transformed from futureEval. Espresso's public API cannot have guava types in its method signatures, so return Future instead of ListenableFuture or SettableFuture.

Returns
Future<E>

public IBinder getIBinder ()

Returns
IBinder

public String getId ()

Returns
String

public void perform (UiController controller, View view)

Parameters
controller UiController
view View

public void setIBinder (IBinder binder)

Parameters
binder IBinder