最近在弄 python 控制 app 做一些自动化的事情碰到很多地方需要点击搜索按钮,搜了一堆,最终找到了完美的解决办法之前的 12345678910def enter(self): # 参考 http://www.lemfix.com/topics/277 # 切换成搜狗输入法 os.system("adb shell ime set com.sohu.inputmethod.sogou/.SogouIME") sleep(5) self.driver.press_keycode(66) # 按回车 sleep(3) os.system("adb ……