Python Appium 输入法切换

来源:互联网 发布:友情链接网站源码 编辑:程序博客网 时间:2024/04/29 22:21
#coding=utf-8import sysreload(sys)sys.setdefaultencoding('utf8')import oscommand0 ='adb shell ime list -s'command1 ='adb shell settings get secure default_input_method'command2 ='adb shell ime set com.android.inputmethod.latin/.LatinIME'command3 ='adb shell ime set io.appium.android.ime/.UnicodeIME'#列出系统现在所安装的所有输入法#os.system(command0)#打印系统当前默认的输入法#os.system(command1)#切换latin输入法为当前输入法#os.system(command2)#切换appium输入法为当前输入法#os.system(command3)class InputMethod: #切换latin输入法为当前输入法def enableLatinIME(self):    os.system(command2)         #切换appium输入法为当前输入法def enableAppiumUnicodeIME(self):    os.system(command3)
0 0