Created
October 4, 2021 20:56
-
-
Save mcatta/1a721994fb20c9ee6f165dc4d8106caa to your computer and use it in GitHub Desktop.
Search node by semantics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Search by contentDescription | |
| composeTestRule. | |
| onNodeWithContentDescription(label = "My fancy button").assertExists() | |
| // Search by a text (for example a button label) | |
| composeTestRule.onNode(hasText("My text label")).assertExists() | |
| // Search by testTag | |
| composeTestRule.onNode(hasTestTag("test_tag")).assertExists() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment