# DeviceAction

# DeviceAction

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/action/DeviceAction.kt+class:androidx.test.espresso.device.action.DeviceAction)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/test/espresso/device/action/DeviceAction "View this page in Java")

<br />

```
interface DeviceAction
```

<br />

*** ** * ** ***

Responsible for performing an interaction on the given device.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [perform](https://developer.android.com/reference/kotlin/androidx/test/espresso/device/action/DeviceAction#perform(androidx.test.platform.device.DeviceController))`(deviceController: `[DeviceController](https://developer.android.com/reference/kotlin/androidx/test/platform/device/DeviceController)`)` Performs this action on the given device. |

## Public functions

### perform

```
fun perform(deviceController: DeviceController): Unit
```

Performs this action on the given device.  

|                                                              Parameters                                                               |
|---------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------|
| `deviceController: `[DeviceController](https://developer.android.com/reference/kotlin/androidx/test/platform/device/DeviceController) | the controller to use to interact with the device. |