问题
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.
来源:https://stackoverflow.com/questions/43396253/toggle-software-keyboard-for-entire-test-suite-in-appium-python