赞
踩
官网地址:https://developer.android.google.cn/studio/command-line/adb
下载好解压后设置环境变量即可
参照此篇文章:https://www.cnblogs.com/corsacsherry/p/10609339.html
adb devices -l
命令查看已连接的设备pip install --pre -U uiautomator2
python -m uiautomator2 init
注意打开设备,允许uiautomator.apk的安装
参考连接:https://blog.csdn.net/plychoz/article/details/80231550
import uiautomator2 as d
import time
def douyin():
#通过usb连接
a=d.connect_usb('3d51a18c')
# 打开抖音
a(text="抖音极速版").click()
while True:
time.sleep(10)
# 滑动视频
a.swipe(313,1370,313,110)
if __name__=='__main__':
douyin()
点击运行即可
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。