[Android]: Not able to type text in Edit text box when multiple Edit text box are present on page

Hi Appium developers,

Please look into this issue , lot of people is getting this issue with android . I tried with latest build also but still the issue is there. Please any reply or give some workaround or any milestone when it will be fixed. Or atleast confirm whether this issue is really a ISSUE FOR U GUYS OR NOT ???

PLEASE CHECK THIS ISSUE FOR DETAILS OPENED IN GITHUB.

PLEASE PLEASE PLEASE GIVE ANY HEALTHY ANSWERS/SOLUTIONS FOR THIS.

Thanks,
Nischal Sinha

@Nischal_Sinha Dont be stuck while its not fixed. Do your own method. For example for numbers/letters you can click on the element you want to insert text and then just send android keycodes

p.e. (in ruby):

    def fill_number_text(number)
    my_array = number.to_s.chars.map(&:to_s)
    my_array.each do |value|
        case value
            when '+'
                press_keycode 81
            when '0'
                press_keycode 7
            when '1'
                press_keycode 8
            when '2'
                press_keycode 9
            when '3'
                press_keycode 10
            when '4'
                press_keycode 11
            when '5'
                press_keycode 12
            when '6'
                press_keycode 13
            when '7'
                press_keycode 14
            when '8'
                press_keycode 15
            when '9'
                press_keycode 16
            when 'a'
                press_keycode 29
            when 'b'
                press_keycode 30
            when 'c'
                press_keycode 31
            when 'd'
                press_keycode 32
            when 'e'
                press_keycode 33
            when 'f'
                press_keycode 34
            when 'g'
                press_keycode 35
            when 'h'
                press_keycode 36
            when 'i'
                press_keycode 37
            when 'j'
                press_keycode 38
            when 'k'
                press_keycode 39
            when 'l'
                press_keycode 40
            when 'm'
                press_keycode 41
            when 'n'
                press_keycode 42
            when 'o'
                press_keycode 43
            when 'p'
                press_keycode 44
            when 'q'
                press_keycode 45
            when 'r'
                press_keycode 46
            when 's'
                press_keycode 47
            when 't'
                press_keycode 48
            when 'u'
                press_keycode 49
            when 'v'
                press_keycode 50
            when 'w'
                press_keycode 51
            when 'x'
                press_keycode 52
            when 'y'
                press_keycode 53
            when 'z'
                press_keycode 54
            when ' '
                press_keycode 62
            else
                raise 'Digit not expected'
        end
    end
end

Thanks so much Telmo now I have clear idea that its a bug . Is it possible for u to give this code in Java???

You can use the method

public void sendKeyEvent(int key) {
    execute(KEY_EVENT, getCommandImmutableMap(KEY_CODE, key));
}

That 5 days ago was moved to AndroidDriver.java: https://github.com/appium/java-client/blob/master/src/main/java/io/appium/java_client/android/AndroidDriver.java

In this page you have the existant keys you can send: http://developer.android.com/reference/android/view/KeyEvent.html

I cant lose time making you the method, just try to send keys to android, I’m sure you will find examples around

Really Thanks for your great support. But I tried to type some letters in my app through this command…

adb shell input keyevent press_keycode 45
adb shell input keyevent press_keycode 44

Its not able to type anything :frowning:

do you have the keyboard open when you send those events? Like I told before you need to click on the EditText you want to use to send text in order to place the focus there and open keyboard.

Yes keyboard is opened and I focussed on that text box . Its really strange that everything works fine Appium also adb command also but not for my Create account page where multiple text boxes are present.