# testTag

Common/AllAndroid/JVM

## Functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/testTag.modifier#(androidx.compose.ui.Modifier).testTag(kotlin.String)(tag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Applies a tag to allow modified element to be found in tests. | Cmn |

## Functions

### Modifier.testTag

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/platform/TestTag.kt+function:testTag) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun Modifier.testTag(tag: String): Modifier
```

Applies a tag to allow modified element to be found in tests.

This is a convenience method for a `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/semantics.modifier#(androidx.compose.ui.Modifier).semantics(kotlin.Boolean,kotlin.Function1)` that sets `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/package-summary#(androidx.compose.ui.semantics.SemanticsPropertyReceiver).testTag()`.