lundi 23 février 2015

how to enter text in an edittext and press done using robotium

i have an edittext in my activity view i tried adding text into it using solo.entertext().this method enters the text into the edittext correctly then i need to click on done/enter which is not happening i tried various methods but none worked here are some which i tried for key done/enter



editText.onEditorAction(EditorInfo.IME_ACTION_DONE);
solo.sendKey(KeyEvent.FLAG_SOFT_KEYBOARD);
solo.pressSoftKeyboardNextButton();
solo.sendKey(KeyEvent.ACTION_DOWN);
solo.sendKey(KeyEvent.KEYCODE_ENTER);


when i run the test menu items are clicked.


Aucun commentaire:

Enregistrer un commentaire