# android.support.test.espresso

# android.support.test.espresso

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

## Interfaces

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

## Classes

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

## Exceptions

|----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException)   | An exception which indicates that a Matchermatched multiple views in the hierarchy when only one view was expected.                                                                                                                |
| [AppNotIdleException](https://developer.android.com/reference/android/support/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/android/support/test/espresso/IdlingResourceTimeoutException) | Indicates that an[IdlingResource](https://developer.android.com/reference/android/support/test/espresso/IdlingResource), which has been registered with the framework, has not idled within the allowed time.                      |
| [InjectEventSecurityException](https://developer.android.com/reference/android/support/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/android/support/test/espresso/NoActivityResumedException)         | An exception which indicates that there are no activities in stage RESUMED.                                                                                                                                                        |
| [NoMatchingRootException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingRootException)               | Indicates that a given matcher did not match any[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s (windows) from those that are currently available.                                             |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)               | Indicates that a given matcher did not match any elements in the view hierarchy.                                                                                                                                                   |
| [PerformException](https://developer.android.com/reference/android/support/test/espresso/PerformException)                             | Indicates that an exception occurred while performing a ViewAction on the UI thread.                                                                                                                                               |

-

  ## Interfaces

  - [EspressoException](https://developer.android.com/reference/android/support/test/espresso/EspressoException)
  - [FailureHandler](https://developer.android.com/reference/android/support/test/espresso/FailureHandler)
  - [IdlingResource](https://developer.android.com/reference/android/support/test/espresso/IdlingResource)
  - [IdlingResource.ResourceCallback](https://developer.android.com/reference/android/support/test/espresso/IdlingResource.ResourceCallback)
  - [UiController](https://developer.android.com/reference/android/support/test/espresso/UiController)
  - [ViewAction](https://developer.android.com/reference/android/support/test/espresso/ViewAction)
  - [ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)
  - [ViewFinder](https://developer.android.com/reference/android/support/test/espresso/ViewFinder)
  - [ViewInteractionComponent](https://developer.android.com/reference/android/support/test/espresso/ViewInteractionComponent)
-

  ## Classes

  - [AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder)
  - [DataInteraction](https://developer.android.com/reference/android/support/test/espresso/DataInteraction)
  - [DataInteraction.DisplayDataMatcher](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher)
  - [Espresso](https://developer.android.com/reference/android/support/test/espresso/Espresso)
  - [IdlingPolicies](https://developer.android.com/reference/android/support/test/espresso/IdlingPolicies)
  - [IdlingPolicy](https://developer.android.com/reference/android/support/test/espresso/IdlingPolicy)
  - [IdlingRegistry](https://developer.android.com/reference/android/support/test/espresso/IdlingRegistry)
  - [NoMatchingViewException.Builder](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException.Builder)
  - [PerformException.Builder](https://developer.android.com/reference/android/support/test/espresso/PerformException.Builder)
  - [Root](https://developer.android.com/reference/android/support/test/espresso/Root)
  - [Root.Builder](https://developer.android.com/reference/android/support/test/espresso/Root.Builder)
  - [ViewInteraction](https://developer.android.com/reference/android/support/test/espresso/ViewInteraction)
-

  ## Exceptions

  - [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException)
  - [AppNotIdleException](https://developer.android.com/reference/android/support/test/espresso/AppNotIdleException)
  - [IdlingResourceTimeoutException](https://developer.android.com/reference/android/support/test/espresso/IdlingResourceTimeoutException)
  - [InjectEventSecurityException](https://developer.android.com/reference/android/support/test/espresso/InjectEventSecurityException)
  - [NoActivityResumedException](https://developer.android.com/reference/android/support/test/espresso/NoActivityResumedException)
  - [NoMatchingRootException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingRootException)
  - [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)
  - [PerformException](https://developer.android.com/reference/android/support/test/espresso/PerformException)