Skip to content

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

Open
@stowy

Description

@stowy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions