Skip to content

The function of app.ClearText("{ElementId}") for Xamarin.UITest does not work on MAUI applications #2648

Open
@Moshex

Description

@Moshex

Steps to Reproduce:

  1. Make a Text field in a MAUI application
  2. Make a test to go into the application with app.Repl()
  3. on the page with the text field do the command of app.ClearText("{ElementId}")

Actual Results:
The field is selected but the text does not get cleared

Expected Results:
The text is cleared in the field that the command is used on

Note:

  1. This works in a Xamarin app as expected, it is just a Maui app issue
  2. There is a workaround using app.Query(Chain(GetQuery(), x => x.Invoke("setText", string.Empty))) but I would like to have the function back
  3. There is also a 2nd workaround by adding:
    controls:MaterialTextBoxEntry.Behaviors
    <toolkit:SelectAllTextBehavior />
    </controls:MaterialTextBoxEntry.Behaviors>
    on the text entry field element on a XAML file but again I would like to have the function back.

Thank you for looking into this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature requesttestRelated to the App Center Test service

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions