# IdlingUiController

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/IdlingUiController.java+class:androidx.test.espresso.base.IdlingUiController)

*** ** * ** ***


```
public interface IdlingUiController extends UiController
```

<br />

*** ** * ** ***

Similar to `https://developer.android.com/reference/androidx/test/espresso/UiController` but with one additional method that enables getting an instance of `https://developer.android.com/reference/androidx/test/espresso/base/IdlingResourceRegistry`. For instance, the registry can then be used by `https://developer.android.com/reference/androidx/test/espresso/ViewAction` to register and unregister idling resources before and after performing the actual action.

This interface used for Espresso internals and shouldn't be called by external users.

## Summary

| ### Public methods |
|---|---|
| `abstract https://developer.android.com/reference/androidx/test/espresso/base/IdlingResourceRegistry` | `https://developer.android.com/reference/androidx/test/espresso/base/IdlingUiController#getIdlingResourceRegistry()()` Returns an instance of `https://developer.android.com/reference/androidx/test/espresso/base/IdlingResourceRegistry`. |

| ### Inherited methods |
|---|
| From [androidx.test.espresso.UiController](https://developer.android.com/reference/androidx/test/espresso/UiController) |---|---| | `abstract boolean` | `https://developer.android.com/reference/androidx/test/espresso/UiController#injectKeyEvent(android.view.KeyEvent)(https://developer.android.com/reference/android/view/KeyEvent.html event)` Injects a key event into the application. | | `abstract boolean` | `https://developer.android.com/reference/androidx/test/espresso/UiController#injectMotionEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent.html event)` Injects a motion event into the application. | | `default boolean` | `https://developer.android.com/reference/androidx/test/espresso/UiController#injectMotionEventSequence(java.lang.Iterable<android.view.MotionEvent>)(https://developer.android.com/reference/java/lang/Iterable.html<https://developer.android.com/reference/android/view/MotionEvent.html> events)` | | `abstract boolean` | `https://developer.android.com/reference/androidx/test/espresso/UiController#injectString(java.lang.String)(https://developer.android.com/reference/java/lang/String.html str)` Types a string into the application using series of `https://developer.android.com/reference/android/view/KeyEvent.html`s. | | `abstract void` | `https://developer.android.com/reference/androidx/test/espresso/UiController#loopMainThreadForAtLeast(long)(long millisDelay)` Loops the main thread for a specified period of time. | | `abstract void` | `https://developer.android.com/reference/androidx/test/espresso/UiController#loopMainThreadUntilIdle()()` Loops the main thread until the application goes idle. | |

## Public methods

### getIdlingResourceRegistry

```
abstract IdlingResourceRegistry getIdlingResourceRegistry()
```

Returns an instance of `https://developer.android.com/reference/androidx/test/espresso/base/IdlingResourceRegistry`.