Stay organized with collections
Save and categorize content based on your preferences.
Interfaces
Classes
Exceptions
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-15 UTC.
[null,null,["Last updated 2025-05-15 UTC."],[],[],null,["# androidx.test.espresso\n======================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/androidx/test/espresso/package-summary \"View this page in Kotlin\") \\|Java\n\nInterfaces\n----------\n\n|------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [EspressoException](/reference/androidx/test/espresso/EspressoException) | Used for identifying an exception as coming from the [Espresso](/reference/androidx/test/espresso/Espresso) framework. |\n| [FailureHandler](/reference/androidx/test/espresso/FailureHandler) | Handles failures that happen during test execution. |\n| [IdlingResource](/reference/androidx/test/espresso/IdlingResource) | Represents a resource of an application under test which can cause asynchronous background work to happen during test execution (e.g. an intent service that processes a button click). |\n| [IdlingResource.ResourceCallback](/reference/androidx/test/espresso/IdlingResource.ResourceCallback) | Registered by an [IdlingResource](/reference/androidx/test/espresso/IdlingResource) to notify Espresso of a transition to idle. |\n| [RootViewException](/reference/androidx/test/espresso/RootViewException) | An [EspressoException](/reference/androidx/test/espresso/EspressoException) that can provide a Root View. |\n| [UiController](/reference/androidx/test/espresso/UiController) | Provides base-level UI operations (such as injection of [MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)s) that can be used to build user actions such as clicks, scrolls, swipes, etc. |\n| [ViewAction](/reference/androidx/test/espresso/ViewAction) | Responsible for performing an interaction on the given View element. |\n| [ViewAssertion](/reference/androidx/test/espresso/ViewAssertion) | Responsible for performing assertions on a View element. |\n| [ViewFinder](/reference/androidx/test/espresso/ViewFinder) | Uses matchers to locate particular views within the view hierarchy. |\n\nClasses\n-------\n\n|------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AmbiguousViewMatcherException.Builder](/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder) | Builder for [AmbiguousViewMatcherException](/reference/androidx/test/espresso/AmbiguousViewMatcherException). |\n| [DataInteraction](/reference/androidx/test/espresso/DataInteraction) | An interface to interact with data displayed in AdapterViews. |\n| [DataInteraction.DisplayDataMatcher](/reference/androidx/test/espresso/DataInteraction.DisplayDataMatcher) | Internal matcher that is required for [onData](/reference/androidx/test/espresso/Espresso#onData(org.hamcrest.Matcher\u003c? extends java.lang.Object\u003e)). |\n| [Espresso](/reference/androidx/test/espresso/Espresso) | Entry point to the Espresso framework. |\n| [GraphHolder](/reference/androidx/test/espresso/GraphHolder) | Holds Espresso's object graph. |\n| [IdlingPolicies](/reference/androidx/test/espresso/IdlingPolicies) | Allows users fine grain control over idling policies. |\n| [IdlingPolicy](/reference/androidx/test/espresso/IdlingPolicy) | Allows users to control idling idleTimeouts in Espresso. |\n| [IdlingRegistry](/reference/androidx/test/espresso/IdlingRegistry) | Handles registering and unregistering of [IdlingResource](/reference/androidx/test/espresso/IdlingResource)s with Espresso from within your application code. |\n| [NoMatchingViewException.Builder](/reference/androidx/test/espresso/NoMatchingViewException.Builder) | Builder for [NoMatchingViewException](/reference/androidx/test/espresso/NoMatchingViewException). |\n| [PerformException.Builder](/reference/androidx/test/espresso/PerformException.Builder) | Builder for [PerformException](/reference/androidx/test/espresso/PerformException). |\n| [Root](/reference/androidx/test/espresso/Root) | Represents a root view in the application and optionally the layout params of the window holding it. |\n| [Root.Builder](/reference/androidx/test/espresso/Root.Builder) | |\n| [ViewInteraction](/reference/androidx/test/espresso/ViewInteraction) | Provides the primary interface for test authors to perform actions or asserts on views. |\n\nExceptions\n----------\n\n|----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AmbiguousViewMatcherException](/reference/androidx/test/espresso/AmbiguousViewMatcherException) | An exception which indicates that a `Matcher\u003cView\u003e` matched multiple views in the hierarchy when only one view was expected. |\n| [AppNotIdleException](/reference/androidx/test/espresso/AppNotIdleException) | An exception which indicates that the App has not become idle even after the specified duration. |\n| [IdlingResourceTimeoutException](/reference/androidx/test/espresso/IdlingResourceTimeoutException) | Indicates that an [IdlingResource](/reference/androidx/test/espresso/IdlingResource), which has been registered with the framework, has not idled within the allowed time. |\n| [InjectEventSecurityException](/reference/androidx/test/espresso/InjectEventSecurityException) | An checked [Exception](https://developer.android.com/reference/java/lang/Exception.html) indicating that event injection failed with a . |\n| [NoActivityResumedException](/reference/androidx/test/espresso/NoActivityResumedException) | An exception which indicates that there are no activities in stage RESUMED. |\n| [NoMatchingRootException](/reference/androidx/test/espresso/NoMatchingRootException) | Indicates that a given matcher did not match any [Root](/reference/androidx/test/espresso/Root)s (windows) from those that are currently available. |\n| [NoMatchingViewException](/reference/androidx/test/espresso/NoMatchingViewException) | Indicates that a given matcher did not match any elements in the view hierarchy. |\n| [PerformException](/reference/androidx/test/espresso/PerformException) | Indicates that an exception occurred while performing a ViewAction on the UI thread. |"]]