# RootMatchers

Summary:[Fields](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#lfields)\|[Methods](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#)  

# RootMatchers

| 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

final

class
RootMatchers
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|----------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.test.espresso.matcher.RootMatchers |

<br />

*** ** * ** ***

A collection of matchers for[Root](https://developer.android.com/reference/android/support/test/espresso/Root)objects.

## Summary

|                                                                                                                                                                    ### Fields                                                                                                                                                                    ||
|----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public static final Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | [DEFAULT](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#DEFAULT) Espresso's default[Root](https://developer.android.com/reference/android/support/test/espresso/Root)matcher. |

|                                                                                                                                                                                                                                                          ### Public methods                                                                                                                                                                                                                                                          ||
|---------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | ` `[hasWindowLayoutParams](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#hasWindowLayoutParams())`() `                                                                                                                                                                                                                                                                         |
| ` static Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | ` `[isDialog](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#isDialog())`() ` Matches[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s that are dialogs (i.e.                                                                                                                                                                                 |
| ` static Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | ` `[isFocusable](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#isFocusable())`() ` Matches[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s that can take window focus.                                                                                                                                                                      |
| ` static Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | ` `[isPlatformPopup](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#isPlatformPopup())`() ` Matches[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s that are popups - like autocomplete suggestions or the actionbar spinner.                                                                                                                |
| ` static Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | ` `[isSystemAlertWindow](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#isSystemAlertWindow())`() ` Matches[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s that are system alert windows i.e.                                                                                                                                               |
| ` static Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | ` `[isTouchable](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#isTouchable())`() ` Matches[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s that can receive touch events.                                                                                                                                                                   |
| ` static Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | ` `[withDecorView](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#withDecorView(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> decorViewMatcher) ` Matches[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s with decor views that match the given view matcher. |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||

## Fields

### DEFAULT

```
Matcher<Root> DEFAULT
```

Espresso's default[Root](https://developer.android.com/reference/android/support/test/espresso/Root)matcher.

<br />

## Public methods

### hasWindowLayoutParams

```
Matcher<Root> hasWindowLayoutParams ()
```

<br />

<br />

|                                                 Returns                                                 ||
|-------------------------------------------------------------------------------------------------|--------|
| `Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | <br /> |

### isDialog

```
Matcher<Root> isDialog ()
```

Matches[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s that are dialogs (i.e. is not a window of the currently resumed activity).

<br />

|                                                 Returns                                                 ||
|-------------------------------------------------------------------------------------------------|--------|
| `Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | <br /> |

### isFocusable

```
Matcher<Root> isFocusable ()
```

Matches[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s that can take window focus.

<br />

|                                                 Returns                                                 ||
|-------------------------------------------------------------------------------------------------|--------|
| `Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | <br /> |

### isPlatformPopup

```
Matcher<Root> isPlatformPopup ()
```

Matches[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s that are popups - like autocomplete suggestions or the actionbar spinner.

<br />

|                                                 Returns                                                 ||
|-------------------------------------------------------------------------------------------------|--------|
| `Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | <br /> |

### isSystemAlertWindow

```
Matcher<Root> isSystemAlertWindow ()
```

Matches[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s that are system alert windows i.e. shown on top of all other applications and is not a window of the currently resumed activity

Apps using this type of windows require the following permission:`
android.permission.SYSTEM_ALERT_WINDOW`

<br />

|                                                 Returns                                                 ||
|-------------------------------------------------------------------------------------------------|--------|
| `Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | <br /> |

### isTouchable

```
Matcher<Root> isTouchable ()
```

Matches[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s that can receive touch events.

<br />

|                                                 Returns                                                 ||
|-------------------------------------------------------------------------------------------------|--------|
| `Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | <br /> |

### withDecorView

```
Matcher<Root> withDecorView (Matcher<View> decorViewMatcher)
```

Matches[Root](https://developer.android.com/reference/android/support/test/espresso/Root)s with decor views that match the given view matcher.

<br />

|              Parameters              ||
|--------------------|------------------|
| `decorViewMatcher` | `Matcher` <br /> |

|                                                 Returns                                                 ||
|-------------------------------------------------------------------------------------------------|--------|
| `Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`>` | <br /> |

-

  ## Classes

  - [BoundedMatcher](https://developer.android.com/reference/android/support/test/espresso/matcher/BoundedMatcher)
  - [CursorMatchers](https://developer.android.com/reference/android/support/test/espresso/matcher/CursorMatchers)
  - [CursorMatchers.CursorMatcher](https://developer.android.com/reference/android/support/test/espresso/matcher/CursorMatchers.CursorMatcher)
  - [HasBackgroundMatcher](https://developer.android.com/reference/android/support/test/espresso/matcher/HasBackgroundMatcher)
  - [LayoutMatchers](https://developer.android.com/reference/android/support/test/espresso/matcher/LayoutMatchers)
  - [PreferenceMatchers](https://developer.android.com/reference/android/support/test/espresso/matcher/PreferenceMatchers)
  - [RootMatchers](https://developer.android.com/reference/android/support/test/espresso/matcher/RootMatchers)
  - [ViewMatchers](https://developer.android.com/reference/android/support/test/espresso/matcher/ViewMatchers)
-

  ## Enums

  - [ViewMatchers.Visibility](https://developer.android.com/reference/android/support/test/espresso/matcher/ViewMatchers.Visibility)