# SemanticsNodeInteractionsProvider

Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/SemanticsNodeInteractionsProvider.kt+class:androidx.compose.ui.test.SemanticsNodeInteractionsProvider) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface SemanticsNodeInteractionsProvider
  ```
Known direct subclasses [ComposeTestRule](https://developer.android.com/reference/kotlin/androidx/compose/ui/test/junit4/ComposeTestRule), [ComposeUiTest](https://developer.android.com/reference/kotlin/androidx/compose/ui/test/ComposeUiTest)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/junit4/ComposeTestRule` | A `https://junit.org/junit4/javadoc/latest/org/junit/rules/TestRule.html` that allows you to test and control composables, either in isolation or in applications. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/ComposeUiTest` | A test environment that allows you to test and control composables, either in isolation or in applications. |

Known indirect subclasses [AndroidComposeTestRule](https://developer.android.com/reference/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule), [AndroidComposeUiTest](https://developer.android.com/reference/kotlin/androidx/compose/ui/test/AndroidComposeUiTest), [ComposeContentTestRule](https://developer.android.com/reference/kotlin/androidx/compose/ui/test/junit4/ComposeContentTestRule)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/AndroidComposeUiTest` | Variant of `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/ComposeUiTest` for when you want to have access the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/AndroidComposeUiTest#activity()` of type `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/AndroidComposeUiTest`. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/junit4/ComposeContentTestRule` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/junit4/ComposeTestRule` that allows you to set content without the necessity to provide a host for the content. |

*** ** * ** ***

Provides the main entry point into testing.

Typically implemented by a test rule.

## Summary

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionCollection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#onAllNodes(androidx.compose.ui.test.SemanticsMatcher,kotlin.Boolean)(matcher: https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsMatcher, useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Finds all semantics nodes that match the given condition. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#onNode(androidx.compose.ui.test.SemanticsMatcher,kotlin.Boolean)(matcher: https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsMatcher, useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Finds a semantics node that matches the given condition. | Cmn |

| ### Extension functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#(androidx.compose.ui.test.SemanticsNodeInteractionsProvider).sendIndirectPointerInput(androidx.compose.ui.input.indirect.IndirectPointerEventPrimaryDirectionalMotionAxis,androidx.compose.ui.unit.IntSize,kotlin.Function1)( indirectPointerEventPrimaryDirectionalMotionAxis: https://developer.android.com/reference/kotlin/androidx/compose/ui/input/indirect/IndirectPointerEventPrimaryDirectionalMotionAxis, inputDeviceSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/test/IndirectPointerInjectionScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Sends an indirect pointer gesture globally, targeting the currently focused Compose UI (from root to the focused node). | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionCollection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#(androidx.compose.ui.test.SemanticsNodeInteractionsProvider).onAllNodesWithContentDescription(kotlin.String,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)( label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, substring: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, ignoreCase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Finds all semantics nodes with the given label as content description. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionCollection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#(androidx.compose.ui.test.SemanticsNodeInteractionsProvider).onAllNodesWithTag(kotlin.String,kotlin.Boolean)( testTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Finds all semantics nodes identified by the given tag. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionCollection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#(androidx.compose.ui.test.SemanticsNodeInteractionsProvider).onAllNodesWithText(kotlin.String,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)( text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, substring: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, ignoreCase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Finds all semantics nodes with the given text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#(androidx.compose.ui.test.SemanticsNodeInteractionsProvider).onNodeWithContentDescription(kotlin.String,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)( label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, substring: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, ignoreCase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Finds a semantics node with the given content description. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#(androidx.compose.ui.test.SemanticsNodeInteractionsProvider).onNodeWithTag(kotlin.String,kotlin.Boolean)( testTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Finds a semantics node identified by the given tag. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#(androidx.compose.ui.test.SemanticsNodeInteractionsProvider).onNodeWithText(kotlin.String,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)( text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, substring: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, ignoreCase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Finds a semantics node with the given text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#(androidx.compose.ui.test.SemanticsNodeInteractionsProvider).onRoot(kotlin.Boolean)(useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Finds the root semantics node of the Compose tree. | Cmn |

## Public functions

### onAllNodes

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun onAllNodes(matcher: SemanticsMatcher, useUnmergedTree: Boolean = false): SemanticsNodeInteractionCollection
```

Finds all semantics nodes that match the given condition.

If you are working with elements that are not supposed to occur multiple times use `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#onNode(androidx.compose.ui.test.SemanticsMatcher,kotlin.Boolean)` instead.

For usage patterns and semantics concepts see `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction`

| Parameters |
|---|---|
| `matcher: https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsMatcher` | Matcher used for filtering. |
| `useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If `true`, searches the unmerged semantics tree instead of the merged semantics tree. This allows you to search for individual nodes that would otherwise be part of a larger semantic unit, for example a text and an image forming a Button together. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#onNode(androidx.compose.ui.test.SemanticsMatcher,kotlin.Boolean)` |   |

### onNode

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun onNode(matcher: SemanticsMatcher, useUnmergedTree: Boolean = false): SemanticsNodeInteraction
```

Finds a semantics node that matches the given condition.

Any subsequent operation on its result will expect exactly one element found (unless `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction#assertDoesNotExist()` is used) and will throw an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` if none or more than one element is found.

For usage patterns and semantics concepts see `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction`

| Parameters |
|---|---|
| `matcher: https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsMatcher` | Matcher used for filtering |
| `useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If `true`, searches the unmerged semantics tree instead of the merged semantics tree. This allows you to search for individual nodes that would otherwise be part of a larger semantic unit, for example a text and an image forming a Button together. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#onAllNodes(androidx.compose.ui.test.SemanticsMatcher,kotlin.Boolean)` | to work with multiple elements |

## Extension functions

### SemanticsNodeInteractionsProvider.sendIndirectPointerInput

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/Actions.kt+function:sendIndirectPointerInput)

```
fun SemanticsNodeInteractionsProvider.sendIndirectPointerInput(
    indirectPointerEventPrimaryDirectionalMotionAxis: IndirectPointerEventPrimaryDirectionalMotionAxis,
    inputDeviceSize: IntSize,
    block: IndirectPointerInjectionScope.() -> Unit
): Unit
```

Sends an indirect pointer gesture globally, targeting the currently focused Compose UI (from root to the focused node).

This API requires an active focus state meaning developers need to request focus to the component or a child of the component via SemanticsNodeInteraction.requestFocus() before calling this function. If no component is currently focused, this will throw an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html`.

If there are multiple Compose roots present, this action will target the first focused root.

Indirect pointer input events are touch events that are from an external touchpad whose coordinates are not tied to the screen coordinates.

These events are dispatched through the focused tree, and components will only receive these events if they are focused, or an ancestor of a focused item.

The gesture doesn't need to be complete and can be resumed in a later invocation of `sendIndirectPointerInput { ... }`. The event time is initialized to the current time of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/MainTestClock`.

Be aware that if you split a gesture over multiple invocations of `sendIndirectPointerInput { }`, everything that happens in between will run as if the gesture is still ongoing (imagine a finger still touching the touchpad).

All events that are injected from the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.SemanticsNodeInteractionsProvider).sendIndirectPointerInput(androidx.compose.ui.input.indirect.IndirectPointerEventPrimaryDirectionalMotionAxis,androidx.compose.ui.unit.IntSize,kotlin.Function1)` are batched together and sent after `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.SemanticsNodeInteractionsProvider).sendIndirectPointerInput(androidx.compose.ui.input.indirect.IndirectPointerEventPrimaryDirectionalMotionAxis,androidx.compose.ui.unit.IntSize,kotlin.Function1)` is complete. This method blocks while the events are injected. If an error occurs during execution of `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.SemanticsNodeInteractionsProvider).sendIndirectPointerInput(androidx.compose.ui.input.indirect.IndirectPointerEventPrimaryDirectionalMotionAxis,androidx.compose.ui.unit.IntSize,kotlin.Function1)` or injection of the events, all (subsequent) events are dropped and the error is thrown here.

Due to the batching of events, all events in a block are sent together and no recomposition will take place in between events. Additionally, all events will be generated before any of the events take effect.

Example of sending a swipe:

```kotlin
import androidx.compose.ui.input.indirect.IndirectPointerEventPrimaryDirectionalMotionAxis
import androidx.compose.ui.test.inputDeviceLeft
import androidx.compose.ui.test.inputDeviceRight
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.requestFocus
import androidx.compose.ui.test.sendIndirectPointerInput
import androidx.compose.ui.test.swipeRight
import androidx.compose.ui.unit.IntSize

// Ensure your node is within the focus path (otherwise, you won't get the event).
composeTestRule.onNodeWithTag("myComponent").requestFocus()
composeTestRule.sendIndirectPointerInput(
    indirectPointerEventPrimaryDirectionalMotionAxis =
        IndirectPointerEventPrimaryDirectionalMotionAxis.X,
    // Horizontal trackpad
    inputDeviceSize = IntSize(width = 5000, height = 1000),
) {
    swipeRight(startX = inputDeviceLeft, endX = inputDeviceRight)
}
```

Examples of click:

```kotlin
import androidx.compose.ui.input.indirect.IndirectPointerEventPrimaryDirectionalMotionAxis
import androidx.compose.ui.test.click
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.requestFocus
import androidx.compose.ui.test.sendIndirectPointerInput
import androidx.compose.ui.unit.IntSize

// Ensure the node is within the focus path (otherwise, you won't get the event).
composeTestRule.onNodeWithTag("myComponent").requestFocus()
composeTestRule.sendIndirectPointerInput(
    indirectPointerEventPrimaryDirectionalMotionAxis =
        IndirectPointerEventPrimaryDirectionalMotionAxis.X,
    // Horizontal trackpad
    inputDeviceSize = IntSize(width = 5000, height = 1000),
) {
    click()
}
```

```kotlin
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.input.indirect.IndirectPointerEventPrimaryDirectionalMotionAxis
import androidx.compose.ui.test.inputDeviceCenterX
import androidx.compose.ui.test.inputDeviceCenterY
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.requestFocus
import androidx.compose.ui.test.sendIndirectPointerInput
import androidx.compose.ui.unit.IntSize

// Ensure the node is within the focus path (otherwise, you won't get the event).
composeTestRule.onNodeWithTag("myComponent").requestFocus()

composeTestRule.sendIndirectPointerInput(
    indirectPointerEventPrimaryDirectionalMotionAxis =
        IndirectPointerEventPrimaryDirectionalMotionAxis.X,
    // Horizontal trackpad
    inputDeviceSize = IntSize(width = 5000, height = 1000),
) {
    down(position = Offset(x = inputDeviceCenterX, y = inputDeviceCenterY))
}

// Assert some pressed state is visible

composeTestRule.sendIndirectPointerInput(
    indirectPointerEventPrimaryDirectionalMotionAxis =
        IndirectPointerEventPrimaryDirectionalMotionAxis.X,
    // Horizontal trackpad
    inputDeviceSize = IntSize(width = 5000, height = 1000),
) {
    up()
}
```

Example of sending a click-and-drag:

```kotlin
import androidx.compose.ui.input.indirect.IndirectPointerEventPrimaryDirectionalMotionAxis
import androidx.compose.ui.test.click
import androidx.compose.ui.test.inputDeviceLeft
import androidx.compose.ui.test.inputDeviceRight
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.requestFocus
import androidx.compose.ui.test.sendIndirectPointerInput
import androidx.compose.ui.test.swipeLeft
import androidx.compose.ui.unit.IntSize

// Ensure the node is within the focus path (otherwise, you won't get the event).
composeTestRule.onNodeWithTag("myComponent").requestFocus()
composeTestRule.sendIndirectPointerInput(
    indirectPointerEventPrimaryDirectionalMotionAxis =
        IndirectPointerEventPrimaryDirectionalMotionAxis.X,
    // Horizontal trackpad
    inputDeviceSize = IntSize(width = 5000, height = 1000),
) {
    click()
    advanceEventTime(durationMillis = 100)
    swipeLeft(startX = inputDeviceRight, endX = inputDeviceLeft)
}
```

| Parameters |
|---|---|
| `indirectPointerEventPrimaryDirectionalMotionAxis: https://developer.android.com/reference/kotlin/androidx/compose/ui/input/indirect/IndirectPointerEventPrimaryDirectionalMotionAxis` | The main movement axis (horizontal or vertical) for single-directional scrolling when using the touchpad `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.SemanticsNodeInteractionsProvider).sendIndirectPointerInput(androidx.compose.ui.input.indirect.IndirectPointerEventPrimaryDirectionalMotionAxis,androidx.compose.ui.unit.IntSize,kotlin.Function1)`. For instance, if the primary axis is set to X, a display prioritizes scrolling its content (both horizontal and vertical containers) based on the device's X-axis movement. Note that this input axis may not correspond directly to the resulting scrolling axis on the display (e.g., X-axis movement causing vertical scrolling). |
| `inputDeviceSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` | The dimensions of the external indirect pointer input device that provide the boundaries for indirect input. If you go outside these dimensions, the tests will throw an exception. Note: This is not related to the screen coordinates. |
| `block: https://developer.android.com/reference/kotlin/androidx/compose/ui/test/IndirectPointerInjectionScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | Block of code/events to execute in indirect scope. |

### SemanticsNodeInteractionsProvider.onAllNodesWithContentDescription

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/Finders.kt+function:onAllNodesWithContentDescription)

```
fun SemanticsNodeInteractionsProvider.onAllNodesWithContentDescription(
    label: String,
    substring: Boolean = false,
    ignoreCase: Boolean = false,
    useUnmergedTree: Boolean = false
): SemanticsNodeInteractionCollection
```

Finds all semantics nodes with the given label as content description.

For usage patterns and semantics concepts see `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction`

| Parameters |
|---|---|
| `label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The text to search for. |
| `substring: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, allows matches where the label is a substring of the content description. |
| `ignoreCase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, does a case-insensitive search. |
| `useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, searches the unmerged semantics tree instead of the merged semantics tree. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#onAllNodes(androidx.compose.ui.test.SemanticsMatcher,kotlin.Boolean)` | for more information. |

### SemanticsNodeInteractionsProvider.onAllNodesWithTag

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/Finders.kt+function:onAllNodesWithTag)

```
fun SemanticsNodeInteractionsProvider.onAllNodesWithTag(
    testTag: String,
    useUnmergedTree: Boolean = false
): SemanticsNodeInteractionCollection
```

Finds all semantics nodes identified by the given tag.

For usage patterns and semantics concepts see `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction`

| Parameters |
|---|---|
| `testTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The tag to search for. Looks for exact matches only. |
| `useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, searches the unmerged semantics tree instead of the merged semantics tree. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#onAllNodes(androidx.compose.ui.test.SemanticsMatcher,kotlin.Boolean)` | for more information. |

### SemanticsNodeInteractionsProvider.onAllNodesWithText

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/Finders.kt+function:onAllNodesWithText)

```
fun SemanticsNodeInteractionsProvider.onAllNodesWithText(
    text: String,
    substring: Boolean = false,
    ignoreCase: Boolean = false,
    useUnmergedTree: Boolean = false
): SemanticsNodeInteractionCollection
```

Finds all semantics nodes with the given text.

For usage patterns and semantics concepts see `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction`

| Parameters |
|---|---|
| `text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The text to search for. |
| `substring: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, allows matches where the label is a substring of the content description. |
| `ignoreCase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, does a case-insensitive search. |
| `useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, searches the unmerged semantics tree instead of the merged semantics tree. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#onAllNodes(androidx.compose.ui.test.SemanticsMatcher,kotlin.Boolean)` | for more information. |

### SemanticsNodeInteractionsProvider.onNodeWithContentDescription

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/Finders.kt+function:onNodeWithContentDescription)

```
fun SemanticsNodeInteractionsProvider.onNodeWithContentDescription(
    label: String,
    substring: Boolean = false,
    ignoreCase: Boolean = false,
    useUnmergedTree: Boolean = false
): SemanticsNodeInteraction
```

Finds a semantics node with the given content description.

For usage patterns and semantics concepts see `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction`

| Parameters |
|---|---|
| `label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The text to search for. |
| `substring: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, allows matches where the label is a substring of the content description. |
| `ignoreCase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, does a case-insensitive search. |
| `useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, searches the unmerged semantics tree instead of the merged semantics tree. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#onNode(androidx.compose.ui.test.SemanticsMatcher,kotlin.Boolean)` | for more information. |

### SemanticsNodeInteractionsProvider.onNodeWithTag

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/Finders.kt+function:onNodeWithTag)

```
fun SemanticsNodeInteractionsProvider.onNodeWithTag(
    testTag: String,
    useUnmergedTree: Boolean = false
): SemanticsNodeInteraction
```

Finds a semantics node identified by the given tag.

For usage patterns and semantics concepts see `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction`

| Parameters |
|---|---|
| `testTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The tag to search for. Looks for an exact match only. |
| `useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, searches the unmerged semantics tree instead of the merged semantics tree. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#onNode(androidx.compose.ui.test.SemanticsMatcher,kotlin.Boolean)` | for more information. |

### SemanticsNodeInteractionsProvider.onNodeWithText

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/Finders.kt+function:onNodeWithText)

```
fun SemanticsNodeInteractionsProvider.onNodeWithText(
    text: String,
    substring: Boolean = false,
    ignoreCase: Boolean = false,
    useUnmergedTree: Boolean = false
): SemanticsNodeInteraction
```

Finds a semantics node with the given text.

For usage patterns and semantics concepts see `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction`

| Parameters |
|---|---|
| `text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The text to search for. |
| `substring: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, allows matches where the label is a substring of the content description. |
| `ignoreCase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, does a case-insensitive search. |
| `useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, searches the unmerged semantics tree instead of the merged semantics tree. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteractionsProvider#onNode(androidx.compose.ui.test.SemanticsMatcher,kotlin.Boolean)` | for more information. |

### SemanticsNodeInteractionsProvider.onRoot

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/Finders.kt+function:onRoot)

```
fun SemanticsNodeInteractionsProvider.onRoot(
    useUnmergedTree: Boolean = false
): SemanticsNodeInteraction
```

Finds the root semantics node of the Compose tree.

Useful for example for screenshot tests of the entire scene.

For usage patterns and semantics concepts see `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction`

| Parameters |
|---|---|
| `useUnmergedTree: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, searches the unmerged semantics tree instead of the merged semantics tree. |