To more closely match real device testing, all emulators and simulators on Sauce Labs currently support software keyboards, also known as “on-screen input method” or “soft-input method." In the emulator or simulator, the keyboard appears as an on-screen image that you can touch.
Software keyboards provide multiple benefits for automated testing. For instance, through preset desired capabilities in the emulator or simulator, you can easily change the keyboard orientation or language. You can also, through simple driver commands, decide to hide or reset the keyboard amongst other things.
Despite its benefits, several disadvantages also exist when using software keyboards. Here are the most common disadvantages that can help you avoid test failures:
Typing with a software keyboard can be slower
A software keyboard is an application running in the emulator or simulator. Like any other application, the speed with which the keyboard application performs mostly depends on: (1) how fast the application receives the command to type, and (2) the rate with which the application decides to type each key.
That being said, delays in the internet connection or in the automation framework being used to communicate with the emulator or simulator can cause the typing to be slow.
In the case of iOS simulators, starting with Appium versions 1.6.4, one can use the “maxTypeFrequency” desired capability to adjust the rate with which each character is typed. The default rate is 5 characters per minute on Appium 1.6.4.
Typing with a software keyboard can be harder and less accurate
During manual tests, the keys on a software keyboard can appear to be too small or too hard to click with accuracy. If this is the case, consider typing slower and selecting emulators or simulators with higher screen resolutions since these will display a software keyboard with bigger size keys.
When displayed, the software keyboard can cover some of the UI elements in the application
When clicking or tapping on an object capable of accepting text, the software keyboard will be displayed covering a big portion of the screen in the emulator or simulator. As a result, this can make existent UI elements not visible, and can cause the driver to fail when trying to find a certain element. To avoid this issue, always hide the keyboard after typing on the text field using the “.hideKeyboard” Appium method.
This YouTube video provides an example for this case.