Toggle Software Keyboard for entire test suite in

2019-09-14 16:55发布

问题:

Currently I am writing iOS tests using Python Appium and would like to completely hide the software keyboard which pops up whenever you have to type something. I am already aware of driver.hide_keyboard() function but it's a pain to include it everywhere in tests.

I was going over the Appium Desired Capabilites but couldn't find anything that will disable the software keyboard. Appreciate if anyone can help me here?

回答1:

To disable soft keyboard in iOS simulator do this:

Simulator Menu > Hardware > Keyboard > Connect Hardware Keyboard (enable it)

Even if you quit and reopen the simulator, the selection will stay. I'm not sure what happens when you factory reset the simulator.

screenshots attached.