Unable to click the Search(magnifying glass) button in Android keyboard using Appium/Selenium/Java

旧时模样 提交于 2019-12-12 03:37:31

问题


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



来源:https://stackoverflow.com/questions/30645710/unable-to-click-the-searchmagnifying-glass-button-in-android-keyboard-using-ap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!