---
title: "hasTestTag"
description: "Verifies the 3D semantic node's test tag."
type: "function"
lastmod: "2026-06-18T10:32:52.441761Z"
---
## API Reference

### hasTestTag

> Source set: Android

```kotlin
public fun hasTestTag(testTag: String): SubspaceSemanticsMatcher
```

Verifies the 3D semantic node's test tag.

This is the primary mechanism for addressing spatial containers, anchors, and 3D panels in
Compose for XR tests.

#### Parameters

| | |
| --- | --- |
| testTag | The string identifier assigned to the spatial element. |

#### Returns

| | |
| --- | --- |
|  | a matcher for the specified [testTag](/jetpack-compose/androidx.xr.compose/compose/functions/testTag). |
