I'm trying to automate a zipcode input field

I’m trying to automate a zipcode input field which popup a num keyboard for user input. Appium could input the zipcode properly, but facing a problem when folding the keyboard, I notice there’s Appium menthod driver.hidekeyboard()

But unfortunately it’s gives error when I using it.

WebDriver error: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: [object Object]

Hi Tim,

The Appium method hideKeyboard() is known to be unstable when used on iPhone devices, as listed in Appium’s currently known open issues. Using this method for an iOS device may cause the Appium script to hang. Appium identifies that the problem is because - “There is no automation hook for hiding the keyboard,…rather than using this method, to think about how a user would hide the keyboard in your app, and tell Appium to do that instead (swipe, tap on a certain coordinate, etc…)”

Workaround: Following the advice of the Appium documentation - use Appium to automate the action that a user would use to hide the keyboard. For example, use the swipe method to hide the keyboard if the application defines this action, or if the application defines a “hide-KB” button, automate clicking on this button.

The other workaround is to use sendkey() without clicking on the text input field.