---
title: "TestFailurePolicy.CaptureMode"
description: "Represents a tri-state flag for failure artifact captures, allowing individual test configurations to explicitly override or fall back to suite-level runner arguments."
type: "class"
---
## API Reference

> Source set: Common

```kotlin
public class CaptureMode private constructor(private val value: Int)
```

Represents a tri-state flag for failure artifact captures, allowing individual test
configurations to explicitly override or fall back to suite-level runner arguments.

This is used within [TestFailurePolicy](/jetpack-compose/androidx.compose.ui/ui-test/classes/TestFailurePolicy/api) to dictate whether the test framework should capture
diagnostic artifacts (like screenshots or UI hierarchy dumps) when a test fails.

## Members

### Companion

> Source set: Common

```kotlin
public companion object
```

## Properties

### Unspecified

> Source set: Common

```kotlin
public val Unspecified: CaptureMode
```

Fall back to the suite-level runner configuration.

### Enabled

> Source set: Common

```kotlin
public val Enabled: CaptureMode
```

Explicitly enable the capture for this test, overriding runner configuration.

### Disabled

> Source set: Common

```kotlin
public val Disabled: CaptureMode
```

Explicitly disable the capture for this test, overriding runner configuration.
