How to go back or hide the keyboard after typing in one text field On iOS ?? I tried using driver.hideKeyboard() but doesn't works with Appium 1.2.1 Please help
Hi, I am using Cucumber+Page-Object+Appium and this is the script : caps = { :browserName => browser_name, :platform => "Android" } client = Selenium::WebDriver::Remote::Http::Default.new client.timeout = 500 @browser = Selenium::WebDriver.for(:remote, :url => "http://localhost:4723/wd/hub/", :http_client => client, :desired_capabilities => caps) I need to hide/close the Android device key-pad due to which some cases are failing. How to do it in ruby. Kindly help me out.
public static void hideKeyboard(AppiumDriver driver) throws Exception {
try {
driver.hideKeyboard();
} catch (Exception e) {
//Lets ignore, apparently its throwing exception when keyboard was not opened
}
}
But if you really need it, check @auto-geek answer in here (I tried it and it works perfectly):