I want to test next thing with Robotium: enter some text in search field, this I did, and click on soft keyboard 'search' button (android:imeOptions=actionSearch) which I am failing to do. I tried with solo.sendKey(Solo.Enter) but no success. I am not sure if this is important, but soft keyboard is not shown at all - I tried to achieve that somehow but without success, also.
Finally! Robotium 5.1 proudly presents to you pressSoftKeyboardSearchButton()
.
For older versions you can use this code (isn't clean enough, but works):
solo.enterText(0, "ItemToSearchFor");
solo.sleep(1000);
solo.clickInList(0);
Have you tried to send this keycode? http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_SEARCH something like this
solo.sendKey(KeyEvent.KEYCODE_HOME);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With