Igor
10/16/2025, 2:59 PMMoe
10/16/2025, 4:13 PMdata-testid, aria-label
then driver.findElement(By.cssSelector("[data-testid='login_button']"))Vidmantas Kerbelis
10/16/2025, 4:30 PMModifier.semantics { testTagsAsResourceId = true }
The way I've done it is I've created an expect/actual called platformTestTagsAsResourceId, implement it in the Android source like this:
actual var SemanticsPropertyReceiver.platformTestTagsAsResourceId: Boolean
get() = testTagsAsResourceId
set(value) {
testTagsAsResourceId = value
}
and add this semantics modifier on the top most composable of your app