# ActiveRootLister

Artifact: [androidx.test.espresso:espresso-core](https://developer.android.com/jetpack/androidx/releases/test-espresso) [View Source](https://cs.android.com/search?q=file:androidx/test/espresso/base/ActiveRootLister.java+class:androidx.test.espresso.base.ActiveRootLister)

*** ** * ** ***


```
public interface ActiveRootLister
```

<br />

*** ** * ** ***

Provides access to all root views in an application.

## Summary

| ### Public methods |
|---|---|
| `abstract https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/test/espresso/Root>` | `https://developer.android.com/reference/androidx/test/espresso/base/ActiveRootLister#listActiveRoots()()` Lists the active roots in an application at this moment. |

## Public methods

### listActiveRoots

```
abstract List<Root> listActiveRoots()
```

Lists the active roots in an application at this moment.

| Returns |
|---|---|
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/test/espresso/Root>` | a list of all the active roots in the application. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | if invoked from a thread besides the main thread. |