Unable to click the Search(magnifying glass) butto

2019-09-09 12:16发布

问题:

I am unable to select the Search button on the Android keyboard the one with Magnifying Glass using Appium/Selenium and Java. I have gone through earlier threads on stackoverflow and none of the threads were helpful.

Need expert help! Thanks!

回答1:

You can use this to use search button on the keyboard:

driver.sendKeyEvent(AndroidKeyCode.ENTER);


回答2:

adb -s UDID_VALUE shell input keyevent 84 or adb -s UDID_VALUE shell input keyevent KEYCODE_SEARCH