Unable to tap 'search' button on Android softKeyboard


I’ve got the same problem,then tried it the way you’ve provided.
And finally it worked out,wonderful!!!


Hi Praveen, I am in a similar issue currently where my mobile app search bar opens mobile softkeyboard with search.
The above option you mentioned seems like a good way of solving my problem however I am not sure how to implement it.
I have a class which extends to Helper Class which has all these methods I am writing for clicking mobile device back button,home button etc.
DO I need to create the public boolean onEditorAction(TextView v, int actionId, KeyEvent event) methods in same class or is it an listener class which I need to create. Can you please send me the complete method code for my reference please.
Thanks in advance.



Try the solution from https://github.com/appium/java-client/issues/916


This solution in JavaScript using wd worked for me:

return driver.waitForElementById(<elementId>).type(<text to type>).click().execute( "mobile: performEditorAction", { "action": "search" } );

This allowed me to find a text field, input some text, and submit a search command (same as clicking the search icon in the keyboard). Of course, you have to replace <elementId> and <text to type> with the proper values. See http://appium.io/docs/en/commands/mobile-command/ for details on “mobile: performEditorAction”.