# StableResult

Artifact: [androidx.test.uiautomator:uiautomator](https://developer.android.com/jetpack/androidx/releases/test-uiautomator) [View Source](https://cs.android.com/search?q=file:androidx/test/uiautomator/StableResult.kt+class:androidx.test.uiautomator.StableResult) Added in [2.4.1](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.4.1)

*** ** * ** ***


```
public final class StableResult
```

<br />

*** ** * ** ***

Represents a node that is considered stable and it's returned by `https://developer.android.com/reference/androidx/test/uiautomator/package-summary#(android.view.accessibility.AccessibilityNodeInfo).waitForStable(kotlin.Long,kotlin.Long,kotlin.Long,kotlin.Boolean)`.

Note that if `https://developer.android.com/reference/androidx/test/uiautomator/StableResult#isTimeout()` is true, it means that the node was not stable by the end of the timeout.

## Summary

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.html` | `https://developer.android.com/reference/androidx/test/uiautomator/StableResult#getNode()()` The latest node acquired, that is stable if `https://developer.android.com/reference/androidx/test/uiautomator/StableResult#(android.view.accessibility.AccessibilityNodeInfo,android.graphics.Bitmap,kotlin.Boolean)` is false. |
| `final https://developer.android.com/reference/android/graphics/Bitmap.html` | `https://developer.android.com/reference/androidx/test/uiautomator/StableResult#getScreenshot()()` A screenshot of the node if `requireStableScreenshot` was set to true. |
| `final boolean` | `https://developer.android.com/reference/androidx/test/uiautomator/StableResult#isTimeout()()` Whether the `https://developer.android.com/reference/androidx/test/uiautomator/package-summary#(android.view.accessibility.AccessibilityNodeInfo).waitForStable(kotlin.Long,kotlin.Long,kotlin.Long,kotlin.Boolean)` request timed out. |

## Public methods

### getNode

Added in [2.4.1](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.4.1)

```
public final @NonNull AccessibilityNodeInfo getNode()
```

The latest node acquired, that is stable if `https://developer.android.com/reference/androidx/test/uiautomator/StableResult#(android.view.accessibility.AccessibilityNodeInfo,android.graphics.Bitmap,kotlin.Boolean)` is false.

### getScreenshot

Added in [2.4.1](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.4.1)

```
public final Bitmap getScreenshot()
```

A screenshot of the node if `requireStableScreenshot` was set to true.

### isTimeout

Added in [2.4.1](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.4.1)

```
public final boolean isTimeout()
```

Whether the `https://developer.android.com/reference/androidx/test/uiautomator/package-summary#(android.view.accessibility.AccessibilityNodeInfo).waitForStable(kotlin.Long,kotlin.Long,kotlin.Long,kotlin.Boolean)` request timed out. If this value is true, `https://developer.android.com/reference/androidx/test/uiautomator/StableResult#(android.view.accessibility.AccessibilityNodeInfo,android.graphics.Bitmap,kotlin.Boolean)` may not be stable.