赞
踩
tap模拟点击事件
position_x 为点击的横坐标,position_y 为点击的纵坐标
ps: 此方法需要知道点击的坐标值,可以打开设置-开发者选项中的报点和指针位置,辅助判断;也可以通过adb shell getevent -l ,查看ABS_MT_POSITION_X和ABS_MT_POSITION_Y获取,其中value值为000001d3和 000008d5,均为十六进制,可以通过转换器换算成十进制。

示范:adb shell input tap 140 2260
swipe模拟滑动事件。可以左右滑动,可以上下滑动
from_x 为滑动起始横坐标,from_y 为滑动起始纵坐标
to_x 为滑动终点横坐标, to_y 为滑动终点纵坐标
示范:
左右滑动:adb shell input swipe 1065 1400 829 1537
上下滑动:adb shell input sw
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。