您的位置:首页 > 移动开发 > Android开发

android adb 自动化命令

2014-03-18 17:10 471 查看
 

因特尔同事写的简单的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

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: