defhide_keyboard(self,key_name=None,key=None,strategy=None):"""Hides the software keyboard on the device. In iOS, use `key_name` to press
a particular key, or `strategy`. In Android, no parameters are used.
:Args:
- key_name - key to press
- strategy - strategy for closing the keyboard (e.g., `tapOutside`)
"""data={}ifkey_nameisnotNone:data['keyName']=key_nameelifkeyisnotNone:data['key']=keyelse:# defaults to `tapOutside` strategy
strategy='tapOutside'data['strategy']=strategyself.execute(Command.HIDE_KEYBOARD,data)returnself
这个方法属于 Driver 实例,用 driver 实例去调,源码里面写的够清楚了
Hides the software keyboard on the device. In iOS, use key_name to press
a particular key, or strategy. In Android, no parameters are used.