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

inputText sometimes repeats individual characters #2005

Open
1 task done
bartekpacia opened this issue Sep 2, 2024 · 3 comments · May be fixed by #2027
Open
1 task done

inputText sometimes repeats individual characters #2005

bartekpacia opened this issue Sep 2, 2024 · 3 comments · May be fixed by #2027
Labels
bug Something isn't working maestro cli Related to the command-line Maestro tool P1 Important, valid issues at the top of the work list platform: android Testing Android apps is affected

Comments

@bartekpacia
Copy link
Contributor

bartekpacia commented Sep 2, 2024

Is there an existing issue for this?

  • I have searched the existing issues and didn't find mine.

Steps to reproduce

This is a flake. It sometimes occur in our E2E action.

Actual results

Sometimes individual characters are repeated.

So far I noticed a few occurences of this:

Expected results

inputText always inputs expactly the text specified.

About app

It's our demo_app.

About environment

The environment on our GitHub Action.

We run tests on Android emulator, v28.

It's unknown at this time if this issue also occurs on iOS.

Logs

Logs
<!-- Replace this line with your logs. *DO NOT* remove the backticks! -->

Maestro version

1.38.1

How did you install Maestro?

install script (https://get.maestro.mobile.dev)

Anything else?

No response

@tokou
Copy link
Contributor

tokou commented Sep 3, 2024

FYI @bartekpacia we experience a lot of those in our flows. We had to resort to stuff like this to try and make tests less flaky

- inputText: 'H'
- inputText: 'e'
- inputText: 'l'
- inputText: 'l'
- inputText: 'o'

@bartekpacia
Copy link
Contributor Author

Offending code:

override fun inputText(
request: MaestroAndroid.InputTextRequest,
responseObserver: StreamObserver<MaestroAndroid.InputTextResponse>
) {
try {
Log.d("Maestro", "Inputting text")
request.text.forEach {
setText(it.toString())
Thread.sleep(75)
}
responseObserver.onNext(inputTextResponse { })
responseObserver.onCompleted()
} catch (e: Throwable) {
responseObserver.onError(e.internalError())
}
}

@tokou
Copy link
Contributor

tokou commented Sep 16, 2024

Linked #1667

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working maestro cli Related to the command-line Maestro tool P1 Important, valid issues at the top of the work list platform: android Testing Android apps is affected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants