# UiAutomationWrapper

Artifact: [androidx.test:runner](https://developer.android.com/jetpack/androidx/releases/test) [View Source](https://cs.android.com/search?q=file:androidx/test/runner/screenshot/UiAutomationWrapper.java+class:androidx.test.runner.screenshot.UiAutomationWrapper)

*** ** * ** ***


```
class UiAutomationWrapper
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> use androidx.test.core.app.DeviceCapture instead

Wrapper for UiAutomation object.

Ideally we wouldn't need this abstraction but since `https://developer.android.com/reference/android/app/UiAutomation.html` is final we need an abstraction on top to be able to mock it in tests.

## Summary

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/android/graphics/Bitmap.html!` | `[takeScreenshot](https://developer.android.com/reference/kotlin/androidx/test/runner/screenshot/UiAutomationWrapper#takeScreenshot())()` **This function is deprecated.** Deprecated in Java |

## Public functions

### takeScreenshot

```
fun [takeScreenshot](https://developer.android.com/reference/kotlin/androidx/test/runner/screenshot/UiAutomationWrapper#takeScreenshot())(): Bitmap!
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java