1 Star 0 Fork 0

lpcssg/EMobile7_da_ka

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
demo.py 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
lpcssg 提交于 2024-04-11 08:29 +08:00 . ..
'adb shell dumpsys window | findstr mCurrentFocus'
# 截图
'adb shell screencap -p /sdcard/mylinux/mydebian/emobile7/screen.png'
# 获取界面元素
'adb shell uiautomator dump --compressed -p /sdcard/mylinux/mydebian/emobile7/window_dump.xml'
# 拉取文件到电脑
'adb pull /sdcard/mylinux/mydebian/emobile7/window_dump.xml ./upload'
'adb shell am start -n com.weaver.emobile7/weaver.fw.com.WelcomeActivity'
'adb shell am start -n com.weaver.emobile7/com.weaver.platform.WebViewActivity'
import subprocess
import time
import datetime
import sys
import socket
import schedule
from my_email import my_email
from xmlparse import *
import configparser
ENCODE = "utf8"
def shell_run(str):
cmd1 = subprocess.Popen(
str,
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
encoding=ENCODE,
)
re1, re2 = cmd1.communicate()
if cmd1.returncode != 0:
print(re2)
# email1.send_email("程序出错,已退出任务:\n" + re2, "打卡结果")
exit()
print(re1)
print(1)
print(re2)
time.sleep(0.5)
shell_run('adb shell am start -n com.hihonor.photos/com.huawei.gallery.app.GalleryMain')
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lpcssg/emobile7_da_ka.git
git@gitee.com:lpcssg/emobile7_da_ka.git
lpcssg
emobile7_da_ka
EMobile7_da_ka
main

搜索帮助