How to dismiss the keyboard in appium using Java? How to dismiss the keyboard in appium using Java? android android

How to dismiss the keyboard in appium using Java?


driver.hideKeyboard() will only work with AppiumDriver. I am using java-client-2.2.0.jar that contains this capability.


Best way is to use the back button.

driver.navigate().back(); // For older version of appium


Add these desired capabilities values if you want to disable the keyboard on your android selenium tests.

capabilities.setCapability("unicodeKeyboard", true);capabilities.setCapability("resetKeyboard", true);