# EspressoDevice

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

*** ** * ** ***


```
public final class EspressoDevice
```

<br />

*** ** * ** ***

Entry point for device centric operations

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/test/espresso/device/DeviceInteraction` | `https://developer.android.com/reference/androidx/test/espresso/device/EspressoDevice#onDevice()()` Starts a {@link DeviceInteraction} fluent API call. |

## Public methods

### onDevice

```
public static final @NonNull DeviceInteraction onDevice()
```

Starts a {@link DeviceInteraction} fluent API call. This method is used to invoke operations that are device-centric in scope. This method should not be called on the main thread.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | when being invoked on the main thread. |