java - How to enter numeric values to Android Numpad using Appium? -


i have tried using :

  1. send_keys method:

driver.send_keys("12345678");

this not give error , yet doesn't enter text.

2.sending key event

hashmap numkeyobject = new hashmap(); numkeyobject.put("keycode", 145); numkeyobject.put("keycode", 146); numkeyobject.put("keycode", 147); numkeyobject.put("keycode", 148); numkeyobject.put("keycode", 149); numkeyobject.put("keycode", 150); ((javascriptexecutor ) driver).executescript("mobile: keyevent", numkeyobject); 

this gives error saying 'org.openqa.selenium.webdriverexception: not yet implemented'

i'm using appium java client 2.2.0

below ways numeric values android numeric keypad

1) driver.sendkeyevent(int key);

list of key codes: - z-> 29 - 54

"0" - "9"-> 7 - 16

back button - 4, menu button - 82

up-19, down-20, left-21, right-22

select (middle) button - 23

space - 62, shift - 59, enter - 66, backspace - 67

you can explaination of keycodes here: https://code.google.com/p/androhid/wiki/keycodes

2) driver.findelementbyid("locatorid").sendkeys("123");

please leave question in comment


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -