# InteractableComponentTester

Artifact: [androidx.xr.scenecore:scenecore-testing](https://developer.android.com/jetpack/androidx/releases/xr-scenecore) [View Source](https://cs.android.com/search?q=file:androidx/xr/scenecore/testing/InteractableComponentTester.kt+class:androidx.xr.scenecore.testing.InteractableComponentTester) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

*** ** * ** ***


```
class InteractableComponentTester
```

<br />

*** ** * ** ***

A test-only accessor for `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/InteractableComponent` that enables direct manipulation and inspection of its internal state.

## Summary

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/InteractableComponentTester#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/InteractableComponentTester#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/InteractableComponentTester#triggerOnInputEvent(androidx.xr.scenecore.InputEvent)(inputEvent: https://developer.android.com/reference/kotlin/androidx/xr/scenecore/InputEvent)` Simulates an input event from the runtime, notifying the listener registered via `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/InteractableComponent.Companion#create(androidx.xr.scenecore.runtime.SceneRuntime,androidx.xr.scenecore.EntityRegistry,java.util.concurrent.Executor,java.util.function.Consumer)`. |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### triggerOnInputEvent

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
fun triggerOnInputEvent(inputEvent: InputEvent): Unit
```

Simulates an input event from the runtime, notifying the listener registered via `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/InteractableComponent.Companion#create(androidx.xr.scenecore.runtime.SceneRuntime,androidx.xr.scenecore.EntityRegistry,java.util.concurrent.Executor,java.util.function.Consumer)`.

| Parameters |
|---|---|
| `inputEvent: https://developer.android.com/reference/kotlin/androidx/xr/scenecore/InputEvent` | The `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/InputEvent` to be triggered. |