【python-appium】模擬手機按鍵搜索異常

執行代碼的過程當中運行self.driver.press_keycode(84)設備沒反映,則須要關閉#desired_caps["unicodeKeyboard"] = "True"輸入法,app

self.driver.press_keycode(84)仍是沒反映就用,self.driver.press_keycode(66)測試

注:84表明模擬按鍵搜索,66表明回車spa

 

若還不行。。code

則須要在輸入代碼行以前切換輸入法,從appium輸入法切換到baidu,切換以後有必要等待幾秒,而後輸入字符,而後執行self.driver.press_keycode(66)blog

測試了半天終於通了。。。。unicode

如何切換輸入法:搜索

 

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@im

相關文章
相關標籤/搜索