<h2 id="testtag-tag">testTag</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public fun SubspaceModifier.testTag(tag: String): SubspaceModifier
```

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

This is a convenience method for a [semantics](/jetpack-compose/androidx.xr.compose/compose/functions/semantics) that sets [SemanticsPropertyReceiver.testTag](/jetpack-compose/androidx.xr.compose/compose/functions/testTag).