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

eraseText only erases text until the middle if the text is long enough #1777

Open
danielferromeral opened this issue Jul 5, 2024 · 6 comments
Labels
bug Something isn't working maestro cli Related to the command-line Maestro tool platform: android Testing Android apps is affected platform: ios Testing iOS apps is affected

Comments

@danielferromeral
Copy link

When I tapOn a textInput, the cursors sets in the middle. When I use eraseText, it stats to delete from that point, but if my text was longer that the middle, some letters are not deleted, so I have to tap again and delete it again.

I would like to be able to complete delete the text input with a single command, or to be able to move the cursor to the end.

@danielferromeral danielferromeral added the enhancement New feature request or improvement of an existing feature label Jul 5, 2024
@bartekpacia
Copy link
Contributor

Hey @danielferromeral, thanks for creating the issue. Could you provide some more information? For example:

  • OS, OS version, physical/virtual device?
  • Framework used to build the app (e.g. SwiftUI, UIKit, Flutter, Compose?)
  • screen recording would be great as well

@bartekpacia bartekpacia added waiting for customer response More information is needed from the customer before we can progress on the issue and removed enhancement New feature request or improvement of an existing feature labels Jul 10, 2024
@danielferromeral
Copy link
Author

danielferromeral commented Jul 12, 2024

Hi @bartekpacia. I have tried in two different devices (both are virtual) and in two different views.

One of the devices was a Virtual iPhone 15 with iOS 17.5, and the views were made with Swift and UIKit.
The other device was a Virtual Pixel 8 Pro, and the views are made with Kotlin and Java, but not sure at all, the developer is in PTO.

The flow I used is this:

- runFlow:
    label: "Erase Text"
    commands:
        - tapOn: 
            id: "emailInput"
        - inputText "[email protected]"
        - tapOn: 
            id: "emailInput"
        - eraseText
        - tapOn: 
            id: "emailInput"
        - eraseText

And this is the result:
https://github.com/user-attachments/assets/d9ab49ff-39de-48b0-a375-8a32bbf20b01

@github-actions github-actions bot removed the waiting for customer response More information is needed from the customer before we can progress on the issue label Jul 12, 2024
@bartekpacia
Copy link
Contributor

Thanks a ton. If you could also drop an .apk, .app or some sample code in e.g. SwiftUI, that'd be great!

@bartekpacia bartekpacia added maestro cli Related to the command-line Maestro tool bug Something isn't working platform: ios Testing iOS apps is affected platform: android Testing Android apps is affected labels Jul 12, 2024
@bartekpacia bartekpacia changed the title [Feature Request] EraseText cleans all the textinput eraseText only erases text until the middle if the text is long enough Jul 12, 2024
@danielferromeral
Copy link
Author

Hi, I cannot provide a sample code, sorry, not a mobile dev. But I guess you could use any input text, like the search bar in the settings for Android. In fact, I made this little script with the search bar of the setting app and is the same bahavoiur. Hope it helps.

appId: com.android.settings

---

- launchApp
- tapOn:
    id: "com.android.settings:id/search_action_bar"
- inputText: "Lorem ipsum dolor sit amet"
# Here you would do other actions and the cursor would be no longer at the end of the text
- tapOn:
    id: "com.google.android.settings.intelligence:id/open_search_view_edit_text"
- eraseText
- tapOn:
    id: "com.google.android.settings.intelligence:id/open_search_view_edit_text"
- eraseText
- stopApp

@bartekpacia
Copy link
Contributor

Thanks @danielferromeral, I was able to reproduce the problem thanks to your code sample.

Run video
repro.mp4

@hormesiel
Copy link

Running into the same problem with Maestro CLI v1.38.1 when executing tests on a physical Android device (OnePlus Nord, Android 12, connected to Windows 11 via USB). Also, this looks like it's a duplicate of #495.

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 platform: android Testing Android apps is affected platform: ios Testing iOS apps is affected
Projects
None yet
Development

No branches or pull requests

3 participants