<div class='type'>Function</div>


<a id='references'></a>


<h2 id="waituntilexactlyoneexists-matcher-timeoutmillis">waitUntilExactlyOneExists</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
@ExperimentalTestApi
fun ComposeUiTest.waitUntilExactlyOneExists(
    matcher: SemanticsMatcher,
    timeoutMillis: Long = 1_000L,
) = waitUntilNodeCount(matcher, 1, timeoutMillis)
```


Blocks until exactly one node matches the given `matcher`.

#### Parameters

| | |
| --- | --- |
| matcher | The matcher that will be used to filter nodes. |
| timeoutMillis | The time after which this method throws an exception if exactly one node does not match the given `matcher`. This observes wall clock time, not frame time. |