Skip to content

How do I hide keyboard?

This example demonstrates how to hide the soft keyboard in the device while performing automation.

In the solution below, we use hideKeyboard command after entering the input values in the home page to close the keyboard on the screen.

Solution:

# Command Target Value
Hide keyboard after entering the value
1 type id=age 08817
2 hideKeyboard

Tips, Tricks, Gotchas & Best Practices:

  • To avoid redundancy, you can use storeKeyboardVisible command to store the keyboard status and use hideKeyboard with conditional logic (if) where it gets executed only if the keyboard is visible on the screen.

  • The above conditional logic is useful when some devices have the tendency to pop the keyboard up while entering values, like iOS in the context of HICC app, whereas the keyboard does not show up with type commands in Android.

Feedback and Knowledge Base