python操作手机app,如何在python脚本使用手机键盘的Android应用程序使用Appium输入数值...
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 h
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.
更多推荐
所有评论(0)