import subprocess import time # 按照次数来点击它 def loop_click_for_android(run_num=30): res = subprocess.Popen('adb devices', shell=True, stdout=subprocess.PIPE) res.stdout.read() num = 0node_time =time.time() start_buttun = subprocess.Popen("adb shell input tap 540 1104", shell=True, stdout=subprocess.PIPE) ifstart_buttun: whileTrue: result = subprocess.Popen("adb shell input tap 540 1104", shell=True, stdout=subprocess.PIPE) ifresult: num += 1 if num ==run_num: break else: continueover_time =time.time() print("{}次点击的运行时间是:{}".format(run_num, over_time-node_time)) # 次数统计并不准确 loop_click_for_android()
python 快速触发adb 命令, 快速点击
免责声明:文章转载自《python 快速触发adb 命令, 快速点击》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
上篇bootstrap基础(二)postgresql查询的处理过程下篇
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=