Skip to content

Most visited

Recently visited

navigation

Class Index

These are the API classes. See all API packages.

A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   R   S   T   U   V   W  

A

AccessibilityChecks A class to enable automated accessibility checks in Espresso tests. 
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. 
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 matched multiple views in the hierarchy when only one view was expected. 
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

BaseLayerComponent Dagger component for base classes. 
BaseLayerModule Dagger module for creating the implementation classes within the base package. 
BaseLayerModule.FailureHandlerHolder Holder for AtomicReference which allows updating it at runtime. 
Beta Signifies that a public API (public class, method or field) is subject to incompatible changes, or even removal, in a future release. 
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

By is a utility class which enables the creation of BySelectors in a concise manner. 

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. 
Conduit A mechanism to get results out of a Javascript context and into a Java context. 
Configurator Allows you to set key parameters for running uiautomator tests. 
CoordinatesProvider Interface to implement calculation of Coordinates. 
CountingIdlingResource This class is deprecated. Use CountingIdlingResource instead. This class has been moved to a different module to avoid a dependency on espresso-contrib in your production code. This class will be removed in a future release.  
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 Cursors based on values in their columns. 

D

DataInteraction An interface to interact with data displayed in AdapterViews. 
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 ERROR(/DrawerLayout)
DrawerMatchers Hamcrest matchers for a ERROR(/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. 
EnableTestTracingRule When applied to a test class this TestRule calls Trace.beginSection() before test method execution. 
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. 
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. 
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. 
GfxMonitor Annotation used to configure a gfx monitor. 
GraphHolder Holds Espresso's object graph. 

H

HumanReadables Text converters for various Android objects. 

I

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. 
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. 
IMonitor An interface used to define a class that monitors test methods and collects metrics. 
IMonitorFactory An interface used to define a class that constructs IMonitors for test methods. 
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 it's 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

J

JankTest Annotation used to configure a jank test method. 
JankTestBase Base test class for measuring Jank. 
JavaScriptBridge Provides a gateway for Java and Javascript code to communicate to eachother. 
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 ViewAssertions. 
LayoutMatchers A collection of hamcrest matches to detect typical layout issues. 
Locator Valid WebDriver locator types. 
LogBatteryInformationRule When applied to a test class this Rule resets battery information ("stats") before test method execution. 
LogDeviceGetPropInfoRule When applied to a test class this Rule executes the "getprop" device command after test method execution and logs it to a file on external storage. 
LoggingBaseRule Base class for logging rules to remove boiler-plate instance variables used by most logging rules. 
LogGraphicsStatsRule When applied to a test class this Rule performs a graphics system information reset before test method execution. 
LogLogcatRule When applied to a test class this Rule attempts to clear the Logcat buffer on the device before test method execution. 
LogNetStatsRule When applied to a test class this Rule performs a network system information reset before test method execution. 

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 ERROR(/NavigationView)  
NoActivityResumedException An exception which indicates that there are no activities in stage RESUMED. 
NoMatchingRootException Indicates that a given matcher did not match any Roots (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

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
PickerActions Espresso action for interacting with DatePicker and TimePicker
PositionAssertions A collection of ViewAssertions 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 Preferences. 
Press Returns different touch target sizes. 

R

RecyclerViewActions ViewActions to interact ERROR(/RecyclerView)
RecyclerViewActions.PositionableRecyclerViewAction Most RecyclerViewActions are given a matcher to select a particular view / viewholder within the RecyclerView. 
ReplaceTextAction Replaces view text by setting EditTexts text property to given String. 
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. 
RuleLoggingUtils Convenience methods to ensure logging rules perform certain actions in the same manner. 

S

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. 
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. 
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. 
TypeTextAction Enables typing text on views. 

U

UiAutomatorInstrumentationTestRunner Test runner for UiAutomatorTestCases. 
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 MotionEvents) that can be used to build user actions such as clicks, scrolls, swipes, etc. 
UiControllerModule Dagger module for UiController. 
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. 
UriMatchers A collection of matchers for Uris, which can match Uris on their properties (host, path, ...). 
UsageTrackerFacilitator Helper class to enable/disable usage tracker in the runner. 
UseMonitorFactory Class annotation used to override the default IMonitorFactory implementation. 

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 A 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 Views. 
ViewMatchers.Visibility Enumerates the possible list of values for View.getVisibility(). 

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 WebAssertions that assert on WebViews. 
WebViewAssertions.ResultDescriber<E> Converts a result to a String. 
WindowReference A reference to a javascript window/frame existing within a WebView. 
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.