Stay organized with collections
Save and categorize content based on your preferences.
public interface RootViewException extends EspressoException
An EspressoException
that can provide a Root View.
Types which implement this are also expected to extend Throwable
or any of its sub-types, as is typical of all Java exceptions.
Summary
Public methods |
abstract @NonNull View |
Returns the root view where this exception is thrown.
|
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-15 UTC."],[],[],null,["# RootViewException\n=================\n\nArtifact: [androidx.test.espresso:espresso-core](/jetpack/androidx/releases/test-espresso) \n[View Source](https://cs.android.com/search?q=file:androidx/test/espresso/RootViewException.java+class:androidx.test.espresso.RootViewException)\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/androidx/test/espresso/RootViewException \"View this page in Kotlin\") \\|Java\n\n\n```\npublic interface RootViewException extends EspressoException\n```\n\n\u003cbr /\u003e\n\nKnown direct subclasses \n[AmbiguousViewMatcherException](/reference/androidx/test/espresso/AmbiguousViewMatcherException), [NoMatchingViewException](/reference/androidx/test/espresso/NoMatchingViewException) \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| [NoMatchingViewException](/reference/androidx/test/espresso/NoMatchingViewException) | Indicates that a given matcher did not match any elements in the view hierarchy. |\n\n*** ** * ** ***\n\nAn [EspressoException](/reference/androidx/test/espresso/EspressoException) that can provide a Root View.\n\nTypes which implement this are also expected to extend [Throwable](https://developer.android.com/reference/java/lang/Throwable.html) or any of its sub-types, as is typical of all Java exceptions.\n\nSummary\n-------\n\n| ### Public methods |\n|----------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| `abstract @`[NonNull](/reference/androidx/annotation/NonNull)` `[View](https://developer.android.com/reference/android/view/View.html) | [getRootView](/reference/androidx/test/espresso/RootViewException#getRootView())`()` Returns the root view where this exception is thrown. |\n\nPublic methods\n--------------\n\n### getRootView\n\n```\nabstract @NonNull View getRootView()\n```\n\nReturns the root view where this exception is thrown."]]