Permalink
Switch branches/tags
Find file Copy path
04934fe Sep 27, 2018
1 contributor

Users who have contributed to this file

25 lines (15 sloc) 1.16 KB

How To Emulate IME Actions Generation

Very often Android developers use onEditorAction callback with actionId argument to implement actions handling, for example, when Search or Done button is pressed on the on-screen keyboard. Appium since version 1.9.2 allows to automate the generation of such actions by providing the special mobile: command.

mobile: performEditorAction

Executes the given editor action on the currently focused element.

Supported arguments

Usage examples

// Java
driver.executeScript("mobile: performEditorAction", ImmutableMap.of("action", "Go"));
# Python
driver.execute_script('mobile: performEditorAction', {'action': 'previous'})