Keyboard Display (FR)

Perfecto Command

mobile:keyboard:display

Supported OS: Android

Purpose

Controls the virtual keyboard display that appears when an edit field is selected.

Switching the default Perfecto keyboard may limit the use of function reference commands such as edit.set.

Parameters

Name Type Possible Values Description
mode String off | never | auto The virtual keyboard display behaviour.
Off (default) - Hide the keyboard for this instance
Never - Never display the keyboard
Auto - Return to the standard device behaviour

Return Value

OK - if successful

Exceptions

None

Examples

Copy

Java sample

Map<String, Object> params = new HashMap<>();
params.put("mode", "off");
String res = (String) driver.executeScript("mobile:keyboard:display", params)
Copy

C# sample

 Dictionary<String, Object> pars = new Dictionary<String, Object>();
 pars.Add("mode", "off");
 String res = (String) driver.ExecuteScript("mobile:keyboard:display", pars);

For Appium, you can Hide (setting "mode" to off) the keyboard with the following:

Copy

Appium sample

driver.hideKeyboard();