# Screenshot.ScreenShotException

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/Screenshot.java+class:androidx.test.runner.screenshot.Screenshot.ScreenShotException)

*** ** * ** ***


```
class Screenshot.ScreenShotException : RuntimeException
```

<br />

|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) ||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) |||
|   |   | ↳ | [java.lang.RuntimeException](https://developer.android.com/reference/java/lang/RuntimeException.html) ||
|   |   |   | ↳ | [androidx.test.runner.screenshot.Screenshot.ScreenShotException](https://developer.android.com/reference/kotlin/androidx/test/runner/screenshot/Screenshot.ScreenShotException) |

*** ** * ** ***

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

An Exception associated with failing to capture a screenshot.

## Summary

### Inherited functions

From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[addSuppressed](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/add-suppressed.html)(exception: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)`

**This function is deprecated.** Deprecated in Java
`synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` `[fillInStackTrace](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/fill-in-stack-trace.html)()`

**This function is deprecated.** Deprecated in Java
`synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` `[getCause](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-cause.html)()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `[getLocalizedMessage](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-localized-message.html)()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `[getMessage](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-message.html)()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!` `[getStackTrace](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-stack-trace.html)()`

**This function is deprecated.** Deprecated in Java
`synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!>!` `[getSuppressed](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-suppressed.html)()`

**This function is deprecated.** Deprecated in Java
`synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` `[initCause](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/init-cause.html)(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[printStackTrace](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html)()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setStackTrace](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/set-stack-trace.html)(stackTrace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `[toString](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/to-string.html)()`

**This function is deprecated.** Deprecated in Java