Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send text to edit text element by accessibility ID from Jetpack compose #577

Open
stowy opened this issue Dec 4, 2023 · 1 comment

Comments

@stowy
Copy link

stowy commented Dec 4, 2023

I set the accessibility of a text field as follows:

                    OutlineTextField(
                        value = email,
                        onValueChange = viewModel::onEmailChange,
                        keyboardOptions = KeyboardOptions(
                            keyboardType = KeyboardType.Email,
                            imeAction = ImeAction.Next
                        ),
                        modifier = Modifier
                            .fillMaxWidth()
                            .focusRequester(focusRequester)
                            .semantics(mergeDescendants = true) {
                                testTag = "email";
                                testTagsAsResourceId = true},
                    )

It says the element cannot have the value set, eg see attached screenshot

Screenshot 2023-12-04 at 4 55 04 pm

If you click on the edit text above and send it passes the text

I'm using the robot library to send the input text which find field by accessibility Id.

@KazuCocoa
Copy link
Member

I wondered if the "EditText" should have been selected. Or alternatively, https://github.com/appium/appium-uiautomator2-driver?tab=readme-ov-file#mobile-type may work after clicking the element

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants