# EspressoException

Summary: \|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/EspressoException#)  

# EspressoException

| 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).

`
public


interface
EspressoException
`  
`


`

|-------------------------------------------------|
| android.support.test.espresso.EspressoException |

|---|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/EspressoException#)Known Indirect Subclasses [AmbiguousElementMatcherException](https://developer.android.com/reference/android/support/test/espresso/web/matcher/AmbiguousElementMatcherException),[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),[NoRemoteEspressoInstanceException](https://developer.android.com/reference/android/support/test/espresso/remote/NoRemoteEspressoInstanceException),[PerformException](https://developer.android.com/reference/android/support/test/espresso/PerformException),[RemoteEspressoException](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteEspressoException),[RemoteProtocolException](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteProtocolException) |--------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [AmbiguousElementMatcherException](https://developer.android.com/reference/android/support/test/espresso/web/matcher/AmbiguousElementMatcherException) | An exception which indicates that for a given XPath there were multiple Elements found when only 1 element was expected.                                                                                                           | | [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.                                                                                                                                                   | | [NoRemoteEspressoInstanceException](https://developer.android.com/reference/android/support/test/espresso/remote/NoRemoteEspressoInstanceException)    | An[Exception](https://developer.android.com/reference/java/lang/Exception.html)which indicates that there are no remote Espresso clients present.                                                                                  | | [PerformException](https://developer.android.com/reference/android/support/test/espresso/PerformException)                                             | Indicates that an exception occurred while performing a ViewAction on the UI thread.                                                                                                                                               | | [RemoteEspressoException](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteEspressoException)                        | Espresso exception representing any runtime related errors in a multi-process environment                                                                                                                                          | | [RemoteProtocolException](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteProtocolException)                        | Espresso exception representing any protocol related errors in a multi-process environment                                                                                                                                         | ||

<br />

*** ** * ** ***

Used for identifying an exception as coming from the[Espresso](https://developer.android.com/reference/android/support/test/espresso/Espresso)framework.  
-

  ## 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)