https://kotlinlang.org logo
#compose-android
Title
# compose-android
m

Marcin Wisniowski

10/25/2023, 2:13 PM
How can I
or
two SemanticsMatcher in a Compose test? I’m looking for something like
composeTestRule.onNode(any(hasText("A"), hasText("B")))
to match a node that either has text A or B.
d

David

10/25/2023, 2:18 PM
Would this work?
Copy code
composeTestRule.onNode(hasText("A").or(hasText("B")))
m

Marcin Wisniowski

10/25/2023, 2:34 PM
Yes, thank you