栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

自动打卡python

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

自动打卡python

**

自动打卡–前几天在CSDN上面观看过一些文章,最后发现手机adb命令结合python的import os函数可以实现这一想法。下面给大家简单介绍一下:

**

import os
import time

# 打开指定浏览器uc浏览器 os.system("adb shell am start (activity名)")
os.system("adb shell am start com.UCMobile/com.UCMobile.main.UCMobile")
# 打开指定的网址  os.system("adb shell am start -a android.intent.action.VIEW -d 网址")
os.system("adb shell am start -a android.intent.action.VIEW -d http://jktb.haedu.gov.cn/?ext=fHh3MD8yMys3fXt8OCs=&")
#确认进入
os.system("adb shell input tap 618 1348")
#输入姓名
os.system("adb shell input tap 550 1088")
os.system("adb shell am broadcast -a ADB_INPUT_TEXT --es msg '小明'" )
#输入证件号
os.system("adb shell input tap 470 1768")
os.system("adb shell input text 41060************")
#输入手机号
os.system("adb shell input tap 469 2042")
os.system("adb shell input text 185********")
#滑动屏幕  这里指的是从一个坐标位置划到下个坐标位置
os.system("adb shell input swipe 930 1859 1080 1016")
os.system("adb shell input swipe 930 1859 1080 1016")
#点击
os.system("adb shell input tap 364 1021")
os.system("adb shell input tap 897 1640")
os.system("adb shell input tap 925 2403")

os.system("adb shell input tap 881 1337")
os.system("adb shell input tap 974 1445")
os.system("adb shell input tap 925 2403")


os.system("adb shell input tap 436 1653")
os.system("adb shell am broadcast -a ADB_INPUT_TEXT --es msg '通信18019'" )


os.system("adb shell input tap 412 1966")
os.system("adb shell am broadcast -a ADB_INPUT_TEXT --es msg '2018xxxxxx'" )

Markdown将文本转换为 HTML。

在这边给大家推荐一下adb安装方法,博主讲的很详细:
https://blog.csdn.net/weixin_43927138/article/details/90477966
还有一个就是通过adb命令直接打开手机上的某一个软件,这个需要对app进行反编译,使用#aapt dump badging +apk路径(直接拖进去)# 获取app的activity名,前提是你有这个环境然后直接打开某一软件,这里我提供了uc浏览器的,如果各位想了解更多的可以自己百度一下 嘿嘿 最后一点就是中文输入,大家可以百度一下一个关于adbkeyboard输入法,可以完美解决输入问题
接下来给大家演示一下
这个是视频地址 不知道为什么我上传不了视频 只能复制个地址给大家了
http://m.youku.com/v_show/id_XNDcwMjc5ODE0NA==.html?pgcpgcid=UNDUzMDM2OTI0OA%3D%3D&sharekey=1a8ee2f0bf31d14d2d5b53766b8faf6b0

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/329894.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号