首页 > 数据库技术 > 详细

批处理脚本+adb命令(二)

时间:2019-05-17 14:43:52      阅读:156      评论:0      收藏:0      [点我收藏+]

目的:

测试中发现一个概率性问题,难以复现,使用脚本替代手工后,下班后操作第二天查看结果

 

脚本如下:

@echo off
set var=0
rem ************循环开始了
:continue
set /a var+=1
echo 第%var%次循环
echo 启动
adb shell input tap 800 200
ping 127.0.0.1 -n "10"
echo 拍照
adb shell input tap 800 2200
ping 127.0.0.1 -n "2"
adb shell input tap 800 2200
ping 127.0.0.1 -n "2"
adb shell input tap 800 2200
ping 127.0.0.1 -n "2"
echo 返回后台
adb shell input keyevent 3
ping 127.0.0.1 -n "10"
echo 启动
adb shell input tap 800 200
ping 127.0.0.1 -n "10"
echo 进入关于界面
adb shell input tap 0 0
ping 127.0.0.1 -n "2"
adb shell input tap 100 1000
ping 127.0.0.1 -n "10"
echo 返回实时界面
adb shell input tap 0 0
ping 127.0.0.1 -n "10"
echo 截图保存到本地
adb shell /system/bin/screencap -p /sdcard/jietu/%var%_screenshot.png
adb pull /sdcard/jietu/%var%_screenshot.png C:/jietu/%var%_screenshot.png
ping 127.0.0.1 -n "3"
echo 退出
adb shell am force-stop com.parts.mobileir.mobileirparts
ping 127.0.0.1 -n "3"
if %var% lss 500 goto continue
rem ************循环结束了
echo 循环执行完毕
pause

批处理脚本+adb命令(二)

原文:https://www.cnblogs.com/lhm-test/p/10880811.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!