点击x,y 坐标点位置:adb shell input tap 50 100 # 点击坐标点 (50, 100) 12.4 swipe 滑动 (长按) 滑动坐标点 (x1,y1) 到 (x2,y2):adb shell input swipe 10 20 100 200 # 从 (10,20) 滑动到 (100,200) 也可以添加滑动时间 (单位:ms):adb shell input swipe 10 20 100 200 500 # 从 ...
使用adb shell input swipe命令来模拟手势滑动事件,例如: 代码语言:javascript 代码运行次数:0 运行 AI代码解释 adb shell input swipe1005001001450100 表示从屏幕坐标(100,500)开始,滑动到(100,1450)结束,整个过程耗时100ms. 使用上面的命令还可以模拟”**长按(long press)**操作,也就是2个坐标点相同,耗时超过50...
adb shell input tap 500 500 对屏幕发送一个触摸事件 adb shell input swipe 900 500 100 500 对屏幕发送一个滑动事件 screencap截图录像系列:没有sd卡就在自带存储的根目录sdcard adb shell screencap –p /sdcard/screen.png 截屏,保存至 sdcard 目录 adb shell screenrecord /sdcard/record.mp4 录制命令,...
# 滑屏 起始点x坐标 起始点y坐标 结束点x坐标 结束点y坐标。 adb shell input swipe 300 1000 300 500 # 向上滑动 adb shell input swipe 300 100 300 1000 # 向下滑动 adb shell input swipe 1000 500 200 500 # 向左滑动 adb shell input swipe 200 500 1000 500 # 向右滑动 # 输入文本 adb shell...
adb shell input swipe 300 1000 300 500 参数300 1000 300 500 分别表示起始点x坐标 起始点y坐标 结束点x坐标 结束点y坐标。 输入文本 在焦点处于某文本框时,可以通过 input 命令来输入文本。 命令: adb shell input text hello 现在hello 出现在文本框了。
adb shell input swipe 500 500 501 501 2000 模拟长按事件 其实就是在小的距离内,在较长的持续时间内进行滑动,最后表现出来的结果就是长按动作 screencap截图命令 adb shell screencap -p /sdcard/DCIM/screenTest.png 截屏图片,保存至 /sdcard/DCIM/ 目录下 ...
滑动接口:swipe(起始X,起始Y,结束X,结束Y) (1)结束X - 起始X:X轴滑动的距离 (2)结束Y - 起始Y:Y轴滑动的距离 手机屏幕尺寸如何兼容(原理) 2.4模拟触屏 TouchAction类 将一系列的动作放在一个链条中,然后将该链条传递给服务器,服务器接受到链条后,解析这个动作,逐个执行。
) do ( echo ***%%i*** call :loop ) pause ::循环体 :loop adb shell input tap 500 500 :wait 3 adb shell input swipe 500 1000 500 0 :wait 3 call :screenshot :wait 2 goto:eof ::截屏 :screenshot adb shell screencap -p /sdcard/1.png adb pull /sdcard/1.png 1.png...
ADB -input swipe模拟长按操作 模拟长按操作(swipe):主要用于模拟手指在屏幕上长按。长按操作 参数:五个参数,分别是起始位置的坐标和结束位置的坐标,长按时长(单位毫秒)模拟在屏幕上的长按操作 ADB -input keyevent模拟按键 模拟按键(keyevent) :主要用于模拟键盘的输入,因此是在用键盘的地方才用得到。模拟...