# 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)

*** ** * ** ***


```
public 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 methods |
|---|---|
| `https://developer.android.com/reference/android/graphics/Bitmap.html` | `[takeScreenshot](https://developer.android.com/reference/androidx/test/runner/screenshot/UiAutomationWrapper#takeScreenshot())()` **This method is deprecated.** Deprecated in Java |

## Public methods

### takeScreenshot

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

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