如上,input后可以跟很多参数, text相当于输入内容,keyevent相当于手机物理或是屏幕按键,tap相当于touch事件,swipe相当于滑动。下面我们来学习相应的用法。 1、input text用法 C:\Documents and Settings\Administrator>adb shell shell@lentk6735_66t_l1:/ $ input text OuyangPeng 1. 2. 如果你此时鼠标是在一个...
input swipe 100 300 500 300 触屏滑动事件,模拟滑动,从x =100 y = 300 滑动到x=500 y=300位置 input press 模拟按下轨迹球 input roll 100 300 模拟轨迹球滑动 x 方向100 y方向300 获取坐标方法: 第一步:计算比例 adb shell getevent -p | grep -e “0035” -e “0036” 获得event 体系里 宽(00...
adb = 'adb shell input text %s'%text os.popen(adb) # 滑动 def swipe(self,x,y,x1,y1): adb = 'adb shell input swipe %s %s %s %s '%(x,y,x1,y1) os.popen(adb) # 模拟按键 def keyevent(self,k): adb = 'adb shell input keyevent %s'%k os.popen(adb) if __name__ == '_...
前言:appium定位也不是万能的,有些元素还是定位不到,这个时候只能换一个方式定位了,可以使用这个adb shell模拟点击。 1.input可以实现的功能 输入文本信息:input text guolinli 物理按键操作: input keyevent KEYCODE_VOLUME_DOWN 点击(DOWN_UP)操作:input tap 500 500 模拟滑动操作:input swipe 200 500 400 500 ...
No 1. adb shell input 1. 模拟点击(500,1000)坐标 adb shell input tap 500 1000 注:获取手机页面中坐标方法: 1)设置--开发者选项中,开启指针位置 (设置--关于手机,连续点击android版本,开启开发者选项) 2)(触屏手机)手指移动,显示当前位置的坐标信息 ...
adbshell模拟点击事件(inputtap)adbshell模拟点击事件(inputtap)前⾔:appium定位也不是万能的,有些元素还是定位不到,这个时候只能换⼀个⽅式定位了,可以使⽤这个adb shell模拟点击。1.input可以实现的功能 输⼊⽂本信息:input text guolinli 物理按键操作: input keyevent KEYCODE_VOLUME_DOWN 点击...
首先在在cmd窗口敲命令:adb shell input help,得到相关的input事件的用法 C:\Documents and Settings\Administrator>adb shell input help Error: Unknown command: he ...
1.模拟点击 adb shell input tap 100 100 2.滑动 adb shell input swipe x1 y1 x2 y2 adb input touchscreen swipe x1 y1 x2 y2 100 adb shell input swipe 100 100 400 100 300 #左往右 adb shell input swipe 400 100 100 100 300 #右往左 ...
使用adb shell input tap命令来模拟屏幕点击事件,例如: 代码语言:javascript 代码运行次数:0 复制 Cloud Studio代码运行 adb shell input tap5001450 表示在屏幕上(500,1450)的坐标点上进行一次点击。 使用adb shell input swipe命令来模拟手势滑动事件,例如: ...