HOW TO HIDE MOBILE KEYPAD IN APPIUM

Hello All, In this article, we are going to see the ways to hide mobile keypad in Appium Use of hide mobile keypad: In automation testing, the keypad frequently pops up and we have to close it manually every time. In order to avoid this, the below syntax is used, so that the process continues without any delay or crash.

Steps to add capability for hide key pad:
  1. Open Eclipse and create Java file
  2. Create capability object like below

DesiredCapabilities capabilities = new DesiredCapabilities();

Set device name using the following syntax

capabilities.setCapability("deviceName", "");
Set platform Version using the following syntax
capabilities.setCapability("platformVersion", "");
Set platform Name using the following syntax

capabilities.setCapability("platformName", "");
Add the following capability for hidden keypad during testing time.

capabilities.setCapability("unicodeKeyboard", true);
capabilities.setCapability("resetKeyboard", true);
Example Code:
DesiredCapabilities capabilities = new DesiredCapabilities();
 capabilities.setCapability("deviceName", "");
 capabilities.setCapability("platformVersion", "");
 capabilities.setCapability("platformName", "Android");
 capabilities.setCapability("takesScreenshot", true);
 capabilities.setCapability("unicodeKeyboard", true);

Comments