android adb 自动化命令

 

因特尔同事写的简单的adb 自动化测试命令 

touch.sh

adb shell input 命令可参考:http://www.w3c.com.cn/android%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B5%8B%E8%AF%95-input 

#!/system/bin/sh

:hello

#ping 123.45.67.89  -n  1  -w  2000> nul  //模拟停2000ms

#adb shell input keyevent 26   //电源键(power)

#adb shell input keyevent 82  //解锁

adb shell input tap 110 311    //触屏坐标

ping 123.45.67.89  -n  1  -w  2000> nul

adb shell input text a        //输入a

adb shell input tap  907 225

ping 123.45.67.89  -n  1  -w  2000> nul

adb shell input text b

adb shell input keyevent 26

adb shell input keyevent 26

ping 123.45.67.89  -n  1  -w  20> nul

adb shell input keyevent 82

goto hello

ping 123.45.67.89  -n  1  -w  20> nul

adb shell input keyevent 82

goto hello

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值