查询Keycode:百度搜索 安卓keycode
https://blog.csdn.net/midux/article/details/80064054
按键模拟:
使用场景:模拟手机硬件信号,如电源,音量,明暗,键盘等。
1、发送键盘字符:如回车,删除键等
2、发送虚拟按键:如返回,拍照等
操作方法:driver.keyevent(keycode)
注:keycode对应的是安卓标准键盘事件,深度定制的系统可能需要切换成搜狗输入法。
import time
from appium import webdriver
from config import *
driver = webdriver.Remote(