John O'Reilly
02/18/2025, 4:35 PMescodro
02/18/2025, 4:39 PMJohn O'Reilly
02/18/2025, 4:40 PMescodro
02/18/2025, 4:41 PMJohn O'Reilly
02/18/2025, 4:42 PMJohn O'Reilly
02/18/2025, 4:43 PMescodro
02/18/2025, 4:47 PMJohn O'Reilly
02/18/2025, 4:49 PMescodro
02/18/2025, 4:52 PMJohn O'Reilly
02/19/2025, 9:22 AMJohn O'Reilly
02/19/2025, 11:13 AMGuilherme Delgado
02/19/2025, 11:13 AMconfigure = { accessibilitySyncOptions = AccessibilitySyncOptions.Always(null) },
worked for me. I’ve tried again and it works with Maestro and also with Accessibility Inspector. I had to change the code to include those settings:
@OptIn(ExperimentalComposeApi::class)
fun MainViewController() = ComposeUIViewController(
configure = { accessibilitySyncOptions = AccessibilitySyncOptions.Always(null) },
content = { App() }
)
John O'Reilly
02/19/2025, 11:14 AM.semantics { testTagsAsResourceId = true }
.testTag("EmailTextField"),
Guilherme Delgado
02/19/2025, 11:14 AMJohn O'Reilly
02/19/2025, 11:15 AMtestTagsAsResourceId
seems to be android specific for some reasonJohn O'Reilly
02/19/2025, 11:16 AMGuilherme Delgado
02/19/2025, 11:17 AMJohn O'Reilly
02/19/2025, 11:18 AMJohn O'Reilly
02/19/2025, 11:19 AMGuilherme Delgado
02/19/2025, 11:23 AMtestTagsAsResourceId = true
🤔 any ideia?John O'Reilly
02/19/2025, 11:24 AMGuilherme Delgado
02/19/2025, 11:25 AMGuilherme Delgado
02/19/2025, 11:25 AMOutlinedTextField(
input, onValueChange = { input = it },
modifier = Modifier.testTag("EmailTextField")
)
Guilherme Delgado
02/19/2025, 11:26 AMGuilherme Delgado
02/19/2025, 11:27 AMJohn O'Reilly
02/19/2025, 11:27 AMGuilherme Delgado
02/19/2025, 11:28 AMGuilherme Delgado
02/19/2025, 11:30 AMJohn O'Reilly
02/19/2025, 11:46 AMGuilherme Delgado
02/19/2025, 11:48 AMcompose-multiplatform = "1.7.0"
John O'Reilly
02/19/2025, 11:49 AMJohn O'Reilly
02/19/2025, 11:49 AMGuilherme Delgado
02/19/2025, 11:49 AMGuilherme Delgado
02/19/2025, 11:54 AMJohn O'Reilly
02/19/2025, 11:54 AMGuilherme Delgado
02/19/2025, 11:57 AM1.8.0-alpha03
the import androidx.compose.ui.platform.AccessibilitySyncOptions
gets unresolved…Guilherme Delgado
02/19/2025, 11:58 AM`AccessibilitySyncOptions` removed. The accessibility tree is built on demand
John O'Reilly
02/19/2025, 11:59 AMGuilherme Delgado
02/19/2025, 12:03 PMGuilherme Delgado
02/19/2025, 12:03 PMGuilherme Delgado
02/19/2025, 12:04 PMGuilherme Delgado
02/19/2025, 12:11 PMJohn O'Reilly
02/19/2025, 12:12 PMGuilherme Delgado
02/19/2025, 12:23 PMGuilherme Delgado
02/19/2025, 12:24 PMGuilherme Delgado
02/19/2025, 12:25 PMGuilherme Delgado
02/19/2025, 12:26 PMGuilherme Delgado
02/19/2025, 12:40 PMJohn O'Reilly
02/20/2025, 12:35 PMtestTag
values I added (which were visible in iOS case) aren't showing up in maestro studio etc?Guilherme Delgado
02/20/2025, 12:45 PMGuilherme Delgado
02/20/2025, 12:46 PMJohn O'Reilly
02/20/2025, 12:46 PMGuilherme Delgado
02/20/2025, 12:48 PMGuilherme Delgado
02/20/2025, 12:49 PMGuilherme Delgado
02/20/2025, 12:50 PMJohn O'Reilly
02/20/2025, 1:01 PMMainActivity
(where CMP code is wrapped)
setComposeView {
Column(
modifier = Modifier.semantics { this.testTagsAsResourceId = true }
) {
John O'Reilly
02/20/2025, 1:02 PM.semantics {
testTag = "EmailTextField"
}
John O'Reilly
02/20/2025, 1:02 PM.testTag("EmailTextField")
(at least in terms of visibility in maestro studio)John O'Reilly
02/20/2025, 1:05 PMtapOn
works when using just testTag
....seems to line up somewhat with what you noticed aboveGuilherme Delgado
02/20/2025, 1:06 PMGuilherme Delgado
02/20/2025, 1:06 PMGuilherme Delgado
02/20/2025, 1:06 PMsetContent {
Box(modifier = Modifier.semantics { testTagsAsResourceId = true }
) {
App()
}
}
Guilherme Delgado
02/20/2025, 1:06 PMGuilherme Delgado
02/20/2025, 1:07 PMOutlinedTextField(
input, onValueChange = { input = it },
modifier = Modifier.semantics(properties = {
testTag = "EmailTextField"
})
)
remain the same.John O'Reilly
02/20/2025, 1:41 PMmoetouban
03/21/2025, 4:30 PMGuilherme Delgado
03/25/2025, 12:05 PMAccessible text input
In Compose Multiplatform 1.8.0-beta01 we’ve introduced support for text fields’ accessibility traits. When a text input field comes into focus, it is now marked as editable, ensuring proper accessibility-state representation.
You can now also use accessible text input in UI testing.But the TextField problem reported still happens with
1.8.0-beta-01
.