I am writing a python script to automate android application.
I want to enter values in text board using mobile keypad.
I was able to enter the value in text field using send_keys, but in some cases I have to enter values using android keypad i.e digits(1,2,3,4,5,6,7,8,9,0) etc.
Can anyone tell me how to enter these value using keypad?
解决方案
Not sure about Python, but this is how I overcome a similar issue from a Java client code.
AndroidDriver driver;
//... then setup driver
//... put some text on target text field
textfield.click();
textfield.sendKeys("some content");
//... finally send Enter key
driver.sendKeyEvent(AndroidKeyCode.ENTER);
Check if the Python API offers such enumeration.
Hope this helps.