app.EnterText not working on some Android devices

when I'm trying to use app.EnterText to enter a zip code(90001), on some devices(Xiaomi MI 2), it will changed to 09708, is the because of the keyboard type?, how can I change that, is there any work around?

Answers

  • Glenn.WilsonGlenn.Wilson USXamarin Team Xamurai

    @weihuiwu Is this a run you are doing locally or is this in the Xamarin Test Cloud?

    A possible work around is to Invoke setText, like:
    app.Query(e=>e.Id("myZipField").Invoke("setText", "90001"));

    This is not the same as having a user type the text. For example, if there are event listeners, they may not be fired.

  • TobiasRoikjerTobiasRoikjer DKXamarin Team Xamurai

    We recommend turning off all keyboard auto completions etc. when testing.

  • weihuiwuweihuiwu USMember

    Thanks, both of you, it turns out to be the zip code is auto configured by the location detection service, and also android devices running Android 4.1.* can no accept EnterText.

  • weihuiwuweihuiwu USMember

    it's an app defect, not from android os

Sign In or Register to comment.