@Colton Idle We are using testTag, but do you have idea how to generate unique number to testTag?
c
Colton Idle
02/21/2022, 7:19 AM
You would do it however you would do in java. There's nothing specific to compose in that.
m
mattinger
02/22/2022, 2:10 PM
@Saurabh Khare You wouldn't want to generate values for the test tag. You want them to be well known, so that you can access them inside your tests. I tend to create constants for my test tags:
Copy code
const val MyButtonTag = "MyButton"
Button(modifier = Modifier.testTag(MyButtonTag)
composeTestRule.onNodeWithTag(MyButtonTag)