# androidx.test.espresso

# androidx.test.espresso

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/test/espresso/package-summary "View this page in Java")

## Interfaces

|------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [EspressoException](https://developer.android.com/reference/kotlin/androidx/test/espresso/EspressoException)                             | Used for identifying an exception as coming from the[Espresso](https://developer.android.com/reference/kotlin/androidx/test/espresso/Espresso)framework.                                                                   |
| [FailureHandler](https://developer.android.com/reference/kotlin/androidx/test/espresso/FailureHandler)                                   | Handles failures that happen during test execution.                                                                                                                                                                        |
| [IdlingResource](https://developer.android.com/reference/kotlin/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).                                    |
| [IdlingResource.ResourceCallback](https://developer.android.com/reference/kotlin/androidx/test/espresso/IdlingResource.ResourceCallback) | Registered by an[IdlingResource](https://developer.android.com/reference/kotlin/androidx/test/espresso/IdlingResource)to notify Espresso of a transition to idle.                                                          |
| [RootViewException](https://developer.android.com/reference/kotlin/androidx/test/espresso/RootViewException)                             | An[EspressoException](https://developer.android.com/reference/kotlin/androidx/test/espresso/EspressoException)that can provide a Root View.                                                                                |
| [UiController](https://developer.android.com/reference/kotlin/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. |
| [ViewAction](https://developer.android.com/reference/kotlin/androidx/test/espresso/ViewAction)                                           | Responsible for performing an interaction on the given View element.                                                                                                                                                       |
| [ViewAssertion](https://developer.android.com/reference/kotlin/androidx/test/espresso/ViewAssertion)                                     | Responsible for performing assertions on a View element.                                                                                                                                                                   |
| [ViewFinder](https://developer.android.com/reference/kotlin/androidx/test/espresso/ViewFinder)                                           | Uses matchers to locate particular views within the view hierarchy.                                                                                                                                                        |

## Classes

|------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/kotlin/androidx/test/espresso/AmbiguousViewMatcherException.Builder) | Builder for[AmbiguousViewMatcherException](https://developer.android.com/reference/kotlin/androidx/test/espresso/AmbiguousViewMatcherException).                                                 |
| [DataInteraction](https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction)                                             | An interface to interact with data displayed in AdapterViews.                                                                                                                                    |
| [DataInteraction.DisplayDataMatcher](https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher)       | Internal matcher that is required for[onData](https://developer.android.com/reference/kotlin/androidx/test/espresso/Espresso#onData(org.hamcrest.Matcher<? extends java.lang.Object>)).          |
| [Espresso](https://developer.android.com/reference/kotlin/androidx/test/espresso/Espresso)                                                           | Entry point to the Espresso framework.                                                                                                                                                           |
| [GraphHolder](https://developer.android.com/reference/kotlin/androidx/test/espresso/GraphHolder)                                                     | Holds Espresso's object graph.                                                                                                                                                                   |
| [IdlingPolicies](https://developer.android.com/reference/kotlin/androidx/test/espresso/IdlingPolicies)                                               | Allows users fine grain control over idling policies.                                                                                                                                            |
| [IdlingPolicy](https://developer.android.com/reference/kotlin/androidx/test/espresso/IdlingPolicy)                                                   | Allows users to control idling idleTimeouts in Espresso.                                                                                                                                         |
| [IdlingRegistry](https://developer.android.com/reference/kotlin/androidx/test/espresso/IdlingRegistry)                                               | Handles registering and unregistering of[IdlingResource](https://developer.android.com/reference/kotlin/androidx/test/espresso/IdlingResource)s with Espresso from within your application code. |
| [NoMatchingViewException.Builder](https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder)             | Builder for[NoMatchingViewException](https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException).                                                             |
| [PerformException.Builder](https://developer.android.com/reference/kotlin/androidx/test/espresso/PerformException.Builder)                           | Builder for[PerformException](https://developer.android.com/reference/kotlin/androidx/test/espresso/PerformException).                                                                           |
| [Root](https://developer.android.com/reference/kotlin/androidx/test/espresso/Root)                                                                   | Represents a root view in the application and optionally the layout params of the window holding it.                                                                                             |
| [Root.Builder](https://developer.android.com/reference/kotlin/androidx/test/espresso/Root.Builder)                                                   |                                                                                                                                                                                                  |
| [ViewInteraction](https://developer.android.com/reference/kotlin/androidx/test/espresso/ViewInteraction)                                             | Provides the primary interface for test authors to perform actions or asserts on views.                                                                                                          |

## Exceptions

|----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AmbiguousViewMatcherException](https://developer.android.com/reference/kotlin/androidx/test/espresso/AmbiguousViewMatcherException)   | An exception which indicates that a`Matcher<View>`matched multiple views in the hierarchy when only one view was expected.                                                                                                         |
| [AppNotIdleException](https://developer.android.com/reference/kotlin/androidx/test/espresso/AppNotIdleException)                       | An exception which indicates that the App has not become idle even after the specified duration.                                                                                                                                   |
| [IdlingResourceTimeoutException](https://developer.android.com/reference/kotlin/androidx/test/espresso/IdlingResourceTimeoutException) | Indicates that an[IdlingResource](https://developer.android.com/reference/kotlin/androidx/test/espresso/IdlingResource), which has been registered with the framework, has not idled within the allowed time.                      |
| [InjectEventSecurityException](https://developer.android.com/reference/kotlin/androidx/test/espresso/InjectEventSecurityException)     | An checked[Exception](https://developer.android.com/reference/java/lang/Exception.html)indicating that event injection failed with a[SecurityException](https://developer.android.com/reference/java/lang/SecurityException.html). |
| [NoActivityResumedException](https://developer.android.com/reference/kotlin/androidx/test/espresso/NoActivityResumedException)         | An exception which indicates that there are no activities in stage RESUMED.                                                                                                                                                        |
| [NoMatchingRootException](https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingRootException)               | Indicates that a given matcher did not match any[Root](https://developer.android.com/reference/kotlin/androidx/test/espresso/Root)s (windows) from those that are currently available.                                             |
| [NoMatchingViewException](https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException)               | Indicates that a given matcher did not match any elements in the view hierarchy.                                                                                                                                                   |
| [PerformException](https://developer.android.com/reference/kotlin/androidx/test/espresso/PerformException)                             | Indicates that an exception occurred while performing a ViewAction on the UI thread.                                                                                                                                               |