::测试之前请将bat脚本由utf-8保存为ANSI编码方式,以免出现乱码
::此脚本用于WiFi开关压力测试
::点击、滑动坐标可根据手机具体情况而修改
echo WiFi_Open/Close_Test>wifi.txt
echo 0代表WiFi处于关闭状态 1代表WiFi处于开启状态 >>wifi.txt
set d=%date:~0,10%
set t=%time:~0,8%
adb wait-for-device
echo 当前时间:%d% %t%
echo WiFi起始状态:>>wifi.txt
adb shell settings get global wifi_on >>wifi.txt
adb shell input keyevent 3
:aaa
set /a num +=1
if %num% lss 101 (
echo 第%num%次测试 >>wifi.txt
echo down >>wifi.txt
adb shell input touchscreen swipe 530 0 530 1400
ping 127.0.0.1 -n 1 > nul
echo left >>wifi.txt
adb shell input touchscreen swipe 1050 1100 5 1100
ping 127.0.0.1 -n 1 > nul
echo click-wifi-status >>wifi.txt
adb shell input mouse tap 206 320
ping 127.0.0.1 -n 1 > nul
echo up >>wifi.txt
adb shell input touchscreen swipe 530 1400 530 0
ping 127.0.0.1 -n 1 > nul
echo 当前WiFi状态:>>wifi.txt
adb shell settings get global wifi_on >>wifi.txt
timeout /T 2
call :aaa)
pause
WiFi开关压力测试
最新推荐文章于 2024-02-10 11:25:22 发布