代码拉取完成,页面将自动刷新
'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')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。