Class Index
These are the API classes. See all API packages.
A
AccessibilityChecks | A class to enable automated accessibility checks in Espresso tests. |
AccessibilityChecks |
This class is deprecated.
use AccessibilityChecks instead.
|
ActiveRootLister | Provides access to all root views in an application. |
ActivityLifecycleCallback | Callback for monitoring activity lifecycle events. |
ActivityLifecycleMonitor | Interface for tests to use when they need to query the activity lifecycle state. |
ActivityLifecycleMonitorRegistry | An exposed registry instance to make it easy for callers to find the lifecycle monitor for their application. |
ActivityLifecycles | Helper methods to understand ActivityLifecycle of the app. |
ActivityResultFunction |
Function that returns an Instrumentation.ActivityResult , to be called by ERROR(/ResettingStubberImpl#getActivityResultFunctionForIntent) .
|
ActivityResultMatchers |
Hamcrest matchers for a Instrumentation.ActivityResult .
|
ActivityTestRule<T extends Activity> |
This rule provides functional testing of a single Activity .
|
AdapterDataLoaderAction | Forces an AdapterView to ensure that the data matching a provided data matcher is loaded into the current view hierarchy. |
AdapterViewProtocol | A sadly necessary layer of indirection to interact with AdapterViews. |
AdapterViewProtocol.AdaptedData | A holder that associates a data object from an AdapterView with a token the AdapterViewProtocol can use to force that data object to be rendered as a child or deeper descendant of the adapter view. |
AdapterViewProtocol.AdaptedData.Builder | |
AdapterViewProtocol.DataFunction |
A custom function that is applied when getData() is executed.
|
AdapterViewProtocols |
Implementations of AdapterViewProtocol for standard SDK Widgets.
|
AmbiguousElementMatcherException | An exception which indicates that for a given XPath there were multiple Elements found when only 1 element was expected. |
AmbiguousViewMatcherException |
An exception which indicates that a Matcher |
AmbiguousViewMatcherException.Builder |
Builder for AmbiguousViewMatcherException .
|
AndroidJUnit4 | Aliases the current default Android JUnit 4 class runner, for future-proofing. |
AndroidJUnitRunner |
An Instrumentation that runs JUnit3 and JUnit4 tests against an Android package
(application).
|
ApplicationLifecycleCallback | Callback for monitoring application lifecycle events. |
ApplicationLifecycleMonitor | Interface for tests to use when they need to be informed of the application lifecycle state. |
ApplicationLifecycleMonitorRegistry | An exposed registry instance to make it easy for callers to find the application lifecycle monitor for their application. |
ApplicationStage | An enumeration of the lifecycle stages an application undergoes that can be monitored. |
AppNotIdleException | An exception which indicates that the App has not become idle even after the specified duration. |
Atom<R> | An Atom is a thin wrapper around javascript. |
AtomAction<E> | A ViewAction which causes the provided Atom to be evaluated within a webview. |
Atoms | Utility class wrapping simple and more commonly used atoms. |
AtraceLogger | Class contains helper methods to dump atrace info asynchronously while running the test case. |
B
BasicScreenCaptureProcessor |
A basic ScreenCaptureProcessor for processing a ScreenCapture .
|
Beta | Signifies that a public API (public class, method or field) is subject to incompatible changes, or even removal, in a future release. |
Bindable |
Interface that can be implemented by classes that provide an IBinder .
|
BoundedMatcher<T, S extends T> | Some matcher sugar that lets you create a matcher for a given type but only process items of a specific subtype of that matcher. |
BundleMatchers |
A collection of hamcrest matchers to match Bundle objects.
|
By |
|
BySelector |
A BySelector specifies criteria for matching UI elements during a call to
findObject(BySelector) .
|
C
Checks | Substitute for Guava Preconditions to avoid guava as a dep. |
CloseKeyboardAction | Closes soft keyboard. |
ComponentNameMatchers |
A collection of hamcrest matchers to match ComponentName objects.
|
Configurator | Allows you to set key parameters for running uiautomator tests. |
ConstructorInvocation | Reflectively invokes the constructor of a declared class. |
Converter<I, O> | Converts input to output. |
CoordinatesProvider | Interface to implement calculation of Coordinates. |
CountingIdlingResource |
An implementation of IdlingResource that determines idleness by maintaining an internal
counter.
|
CursorMatchers |
A collection of Hamcrest matchers that matches a data row in a Cursor .
|
CursorMatchers.CursorMatcher |
A Matcher that matches Cursor s based on values in their columns.
|
D
DataInteraction | An interface to interact with data displayed in AdapterViews. |
DataInteraction.DisplayDataMatcher |
Internal matcher that is required for onData(Matcher) .
|
Default | Annotates a default provider. |
DefaultFailureHandler |
Espresso's default FailureHandler .
|
Direction | An enumeration used to specify the primary direction of certain gestures. |
DisableOnAndroidDebug |
The DisableOnAndroidDebug Rule allows you to label certain rules to be disabled when
debugging.
|
DomMatchers |
A collection of hamcrest matchers for objects in the org.w3c.dom package (such as Document and Element ).
|
DrawerActions |
Espresso actions for using a DrawerLayout .
|
DrawerMatchers |
Hamcrest matchers for a DrawerLayout .
|
DriverAtoms | A collection of Javascript Atoms from the WebDriver project. |
E
EditorAction | Performs whatever editor (IME) action is available on a view. |
ElementReference | A reference to a javascript element existing within a WebView. |
EnableJavascriptAction | Forcibly enables Javascript on a WebView. |
Espresso | Entry point to the Espresso framework. |
EspressoException |
Used for identifying an exception as coming from the Espresso framework.
|
EspressoKey | Class that wraps the key code and meta state of the desired key press. |
EspressoKey.Builder | Builder for the EspressoKey class. |
EspressoOptional<T> |
This class is a wrapper around Optional in order to avoid having
public references to Guava API.
|
EspressoRemote | A singleton class that facilitates communication between other Espresso instance that may be running in different processes. |
EspressoRemoteMessage | Transforms an Espresso remote message from and to a proto message. |
EspressoRemoteMessage.From<T, M> | Transforms a proto message of type M into a class of type T. |
EspressoRemoteMessage.To<M> | Transforms a class implementing this interface to a proto message. |
Evaluation | Represents the results of a Javascript execution. |
EventCondition<R> |
An EventCondition is a condition which depends on an event or series of events having
occurred.
|
F
FailureHandler | Handles failures that happen during test execution. |
FieldDescriptor |
Provides additional meta data about a Field declared in a class.
|
FlakyTest | Designates a test as being flaky (non-deterministic). |
G
GeneralClickAction | Enables clicking on views. |
GeneralLocation | Calculates coordinate position for general locations. |
GeneralSwipeAction | Enables swiping across a view. |
GenericRemoteMessage |
Generic implementation of the EspressoRemoteMessage interface, which uses reflection for
proto message serialization and deserialization.
|
GfxMonitor | Annotation used to configure a gfx monitor. |
GrantPermissionRule |
The GrantPermissionRule Rule allows granting of runtime permissions on Android M (API 23)
and above.
|
H
HasBackgroundMatcher |
Matcher to match View based on its background resource.
|
HumanReadables | Text converters for various Android objects. |
I
IAtomActionResultPropagator | Enables the ability to propagate results back from a remote ViewAction running in a different process. |
IAtomActionResultPropagator.Stub | |
IAtomActionResultPropagator.Stub.Proxy | |
IAutomationSupport | Provides auxiliary support for running test cases |
IdlingPolicies | Allows users fine grain control over idling policies. |
IdlingPolicy | Allows users to control idling idleTimeouts in Espresso. |
IdlingRegistry |
Handles registering and unregistering of IdlingResource s with Espresso from within your
application code.
|
IdlingResource | Represents a resource of an application under test which can cause asynchronous background work to happen during test execution (e.g. |
IdlingResource.ResourceCallback |
Registered by an IdlingResource to notify Espresso of a transition to idle.
|
IdlingResourceRegistry |
Keeps track of user-registered IdlingResources .
|
IdlingResourceTimeoutException |
Indicates that an IdlingResource , which has been registered with the framework, has not
idled within the allowed time.
|
IdlingScheduledThreadPoolExecutor |
A ScheduledThreadPoolExecutor that can be registered as an IdlingResource with
Espresso.
|
IdlingThreadPoolExecutor |
A ThreadPoolExecutor that can be registered as an IdlingResource with Espresso.
|
IdlingUiController |
Similar to UiController but with one additional method that enables getting an instance
of IdlingResourceRegistry .
|
InjectEventSecurityException |
An checked Exception indicating that event injection failed with a SecurityException .
|
InstrumentationRegistry | An exposed registry instance that holds a reference to the instrumentation running in the process and its arguments. |
IntentCallback |
Callback for monitoring Intents captured by Instrumentation .
|
IntentMatchers |
A collection of hamcrest matchers for matching Intent objects.
|
IntentMonitor |
Interface for tests to use when they need to monitor intents used to start activities from
the current Instrumentation .
|
IntentMonitorRegistry |
Exposes an implementation of IntentMonitor to users.
|
Intents | Intents enables validation and stubbing of intents sent out by the application under test. |
IntentsTestRule<T extends Activity> | This rule makes it easy to use Espresso-Intents APIs in functional UI tests. |
IntentStubber |
Interface to intercept activity launch for a given Intent and stub Instrumentation.ActivityResult its response.
|
IntentStubberRegistry |
Exposes an implementation of IntentStubber .
|
InteractionRequest |
Encapsulates an UiInteraction.InteractionRequestProto request.
|
InteractionRequest.Builder |
Creates an instance of InteractionRequest from a View matcher and action.
|
InteractionResponse |
Encapsulates a UiInteraction.InteractionResultProto request.
|
InteractionResponse.Builder |
Builder for InteractionResponse
|
InteractionResponse.RemoteError | TODO(b/31122396): parse this from a proto Enum representing wire protocol error codes and their default description. |
InteractionResponse.Status | The status of this interaction response. |
InterceptingActivityFactory | Implement this interface to provide custom implementation of Activity under test. |
InterruptableUiController |
Similar to UiController but with one additional method that enables interrupting Espresso
tasks.
|
J
JankTest | Annotation used to configure a jank test method. |
JankTestBase | Base test class for measuring Jank. |
JSONAble | Allows implementors to instruct ModelCodec on how to encode this object as JSON. |
JSONAble.DeJSONFactory | Allows implementors to replace a JSONObject (representated as a map) with a more applicable object. |
K
KeyEventAction | Enables pressing KeyEvents on views. |
L
LargeTest | Annotation to assign a large test size qualifier to a test. |
LayoutAssertions |
A collection of layout ViewAssertion s.
|
LayoutMatchers | A collection of hamcrest matches to detect typical layout issues. |
Locator | Valid WebDriver locatorType types. |
M
MainThread | Annotates an Executor that executes tasks on the main thread |
MediumTest | Annotation to assign a medium test size qualifier to a test. |
ModelCodec | Encodes/Decodes JSON. |
MonitoringInstrumentation | An instrumentation that enables several advanced features and makes some hard guarantees about the state of the application under instrumentation. |
MonitoringInstrumentation.ActivityFinisher | Loops through all the activities that have not yet finished and explicitly calls finish on them. |
MotionEvents |
Facilitates sending of motion events to a UiController .
|
MotionEvents.DownResultHolder | Holds the result of a down motion. |
N
NavigationViewActions |
View actions for interacting with NavigationView
|
NoActivityResumedException | An exception which indicates that there are no activities in stage RESUMED. |
NoMatchingRootException |
Indicates that a given matcher did not match any Root s (windows) from those that are
currently available.
|
NoMatchingViewException | Indicates that a given matcher did not match any elements in the view hierarchy. |
NoMatchingViewException.Builder |
Builder for NoMatchingViewException .
|
NoopRemoteInteraction | Noop RemoteInteraction object |
NoRemoteEspressoInstanceException |
An Exception which indicates that there are no remote Espresso clients present.
|
O
OngoingStubbing | Supports method chaining after @Intents#intending method call. |
OpenLinkAction | Invokes onClick of a link within a TextView (made with Linkify or via another method). |
P
PerformException | Indicates that an exception occurred while performing a ViewAction on the UI thread. |
PerformException.Builder |
Builder for PerformException .
|
PermissionRequester | Requests a runtime permission on devices running Android M (API 23) and above. |
PickerActions |
Espresso action for interacting with DatePicker and TimePicker .
|
PositionAssertions |
A collection of ViewAssertion s for checking relative position of elements on the screen.
|
PrecisionDescriber | Interface to implement size of click area. |
PreferenceMatchers |
A collection of hamcrest matchers that match Preference s.
|
Press | Returns different touch target sizes. |
PressBackAction | Performs an Android press back action |
ProtoUtils | Contains various utility methods to ease use of protos and increased readability in code. |
ProviderTestRule |
A TestRule to test ContentProvider s, with additional APIs to enable easy
initialization such as restoring database from a file, running database commands passed in as a
String or a file.
|
ProviderTestRule.Builder |
A Builder to ease ProviderTestRule creation.
|
R
RecyclerViewActions |
ViewAction s to interact RecyclerView .
|
RecyclerViewActions.PositionableRecyclerViewAction | Most RecyclerViewActions are given a matcher to select a particular view / viewholder within the RecyclerView. |
RemoteDescriptor | Descriptor object containing all the required information to serialize and deserialize a type to and from a proto. |
RemoteDescriptor.Builder |
Builder for RemoteDescriptor
|
RemoteDescriptorRegistry | A registry for registering remote descriptors. |
RemoteEspressoException | Espresso exception representing any runtime related errors in a multi-process environment |
RemoteInteraction | Facilitates communication between other Espresso instance that may be running in different processes. |
RemoteInteractionRegistry | An exposed registry instance to make it easy for callers to get a hold of Remote Interaction |
RemoteProtocolException | Espresso exception representing any protocol related errors in a multi-process environment |
RepeatActionUntilViewState | Enables performing a given action on a view until it reaches desired state matched by given View matcher. |
ReplaceTextAction |
Replaces view text by setting EditText s text property to given String.
|
RequestPermissionCallable |
Base class for runtime permission Callable s.
|
RequestPermissionCallable.Result | Result of a permission request. |
RequiresDevice | Indicates that a specific test should not be run on emulator. |
ResettingStubber | A sneaky singleton object used to respond to intents with fake responses. |
ResettingStubberImpl |
Implementation of ResettingStubber
|
ResolvedIntent |
An Intent that has been processed to determine the set of packages to which it resolves.
|
Root | Represents a root view in the application and optionally the layout params of the window holding it. |
Root.Builder | |
RootMatchers |
A collection of matchers for Root objects.
|
RootViewPicker | Provides the root View of the top-most Window, with which the user can interact. |
RootViewPickerScope |
Scope for components that use RootViewPicker .
|
S
ScreenCapture |
A ScreenCapture contains a bitmap of a device screen along with a set of ScreenCaptureProcessor s that will be used to process the ScreenCapture when process() is called.
|
ScreenCaptureProcessor |
Interface for an object that is capable of processing ScreenCapture s.
|
Screenshot |
The Screenshot instance provides methods to capture a ScreenCapture during
instrumentation tests run on an android device.
|
ScrollToAction | Enables scrolling to the given view. |
SdkSuppress | Indicates that a specific test or class requires a minimum or maximum API Level to execute. |
SearchCondition<R> |
A SearchCondition is a condition that is satisfied by searching for UI elements.
|
ServiceTestRule | A JUnit rule that provides a simplified mechanism to start and shutdown your service before and after the duration of your test. |
ShellCommand |
Ideally we wouldn't need this abstraction but since UiAutomation is final we need an
abstraction on top to be able to mock it in tests.
|
SimpleAtom | A simple implementation of Atom suitable for subclassing. |
SimpleAtom.ElementReferencePlacement | Controls whether the ElementReference appears as the first arg or last arg to the script. |
SingleActivityFactory<T extends Activity> |
Abstract implementation of InterceptingActivityFactory which allows to intercept only one
activity at a time.
|
SmallTest | Annotation to assign a small test size qualifier to a test. |
Stage | An enumeration of the lifecycle stages an activity undergoes. |
StaleObjectException |
A StaleObjectException exception is thrown when a UiObject2 is used after the
underlying View has been destroyed.
|
Suppress | Use this annotation on test classes or test methods that should not be included in a test suite. |
Swipe | Executes different swipe types to given positions. |
Swiper | Interface to implement different swipe types. |
Swiper.Status | The result of the swipe. |
T
TagSoupDocumentParser | Uses TagSoup to parse html into Documents. |
Tap | Executes different click types to given position. |
Tapper | Interface to implement different click types. |
Tapper.Status | The result of the tap. |
TransformingAtom<I, O> | Decorates another atom and transforms its output to another type. |
TransformingAtom.Transformer<I, O> | Converts input to output. |
TreeIterables | Utility methods for iterating over tree structured items. |
TreeIterables.ViewAndDistance | Represents the distance a given view is from the root view. |
TypeProtoConverters |
Converters from Any proto messages to their unwrapped target types.
|
TypeTextAction | Enables typing text on views. |
U
UiAutomationWrapper | Wrapper for UiAutomation object. |
UiAutomatorInstrumentationTestRunner |
Test runner for UiAutomatorTestCase s.
|
UiAutomatorTestCase |
This class is deprecated.
It is no longer necessary to extend UiAutomatorTestCase. You can use
getInstance(Instrumentation) from any test class as long as you have access to
an Instrumentation instance.
|
UiCollection | Used to enumerate a container's UI elements for the purpose of counting, or targeting a sub elements by a child's text or description. |
UiController |
Provides base-level UI operations (such as injection of MotionEvent s) that can be used to
build user actions such as clicks, scrolls, swipes, etc.
|
UiDevice | UiDevice provides access to state information about the device. |
UiObject | A UiObject is a representation of a view. |
UiObject2 |
A UiObject2 represents a UI element.
|
UiObject2Condition<R> |
A UiObject2Condition is a condition which is satisfied when a UiObject2 is in a
particular state.
|
UiObjectNotFoundException |
Generated in test runs when a UiSelector selector could not be matched
to any UI element displayed.
|
UiScrollable |
UiScrollable is a UiCollection and provides support for searching
for items in scrollable layout elements.
|
UiSelector | Specifies the elements in the layout hierarchy for tests to target, filtered by properties such as text value, content-description, class name, and state information. |
UiThreadTest | Methods annotated with this annotation will be executed on the application's UI thread (or main thread). |
UiThreadTestRule |
This class is deprecated.
use UiThreadTest directly without this rule. UiThreadTest is now
supported as part of the core Android test runner to provide the ability to run methods
annotated with @Before and @After on the UI thread regardless of
what @Test is annotated with.
|
UiWatcher |
See registerWatcher(String, UiWatcher) on how to register a
a condition watcher to be called by the automation library.
|
Until |
The Until class provides factory methods for constructing common conditions.
|
UriIdlingResource |
An implementation of IdlingResource useful for monitoring idleness of network traffic.
|
UriIdlingResource.HandlerIntf | Wraps a Handler object. |
UriMatchers |
A collection of matchers for Uri s, which can match Uris on their properties (host, path,
...).
|
UsageTrackerFacilitator | Helper class to enable/disable usage tracker in the runner. |
V
VerifiableIntent |
A ResolvedIntent that can be marked as verified.
|
VerificationMode | An interface for different modes of verifying intents. |
VerificationModes |
Implementations of VerificationMode .
|
ViewAction | Responsible for performing an interaction on the given View element. |
ViewActions |
A collection of common ViewActions .
|
ViewAssertion | Responsible for performing assertions on a View element. |
ViewAssertions |
Collection of common ViewAssertions .
|
ViewFinder | Uses matchers to locate particular views within the view hierarchy. |
ViewFinderImpl |
Implementation of ViewFinder .
|
ViewInteraction | Provides the primary interface for test authors to perform actions or asserts on views. |
ViewInteractionComponent | Dagger component for view interaction classes. |
ViewMatchers |
A collection of hamcrest matchers that match View s.
|
ViewMatchers.Visibility |
Enumerates the possible list of values for getVisibility() .
|
ViewPagerActions |
Espresso actions for interacting with a ViewPager .
|
W
Web | An Entry Point to work with WebViews on Android. |
Web.WebInteraction<R> | Analogous to a ViewInteraction or a DataInteraction, a WebInteraction exposes a fluent API to the underlying WebView. |
WebAssertion<E> |
Similar to a ViewAssertion , a WebAssertion allows users to check the results of
an atom evaluated against the provided WebView .
|
WebViewAssertions |
A collection of WebAssertion s that assert on WebView s.
|
WebViewAssertions.ResultDescriber<E> | Converts a result to a String. |
WindowReference | A reference to a javascript window/frame existing within a WebView. |