adb做为android的调试桥,在做app自动化中有着巨大的用处,可以帮助我们解决问题,今天主要认识adb shell input
adb shell input
我们首先通过cmd输入adb shell input有哪些内容
$ adb shell input
Usage: input [] [...]
The sources are:
mouse
keyboard
joystick
touchnavigation
touchpad
trackball
stylus
dpad
touchscreen
gamepad
The commandsanddefault sources are:
text(Default: touchscreen)
keyevent [--longpress] ... (Default: keyboard)
tap(Default: touchscreen)
swipe[duration(ms)] (Default: touchscreen)
press (Default: trackball)
roll (Default: trackball)
上面这么多到底讲的啥?
其实说白了就是支持一下内容
1、text:支持输入文本内容(暂不支持中文)
2、keyevent:模拟按键
3、tap:点击
4、swipe:滑动
5、press:轨迹球按下
6、roll:轨迹球滚动
text