pocoui:https://poco.readthedocs.io/zh_CN/latest/source/README.html
aritest:https://airtest.doc.io.netease.com/IDEdocs/airtest_framework/8_airtest_using/
环境
MUMU模拟器:2.6.30.0 python:3.8.5 adb:添加进环境变量,adb的环境变量可以添加IDE中adb.exe的路径 ide:下载airtest IDE
1、utils/connect.py
__author__ = 'xiao'
from airtest.core.api import *
from airtest.core.error import AdbError, DeviceConnectionError
# use url to connect application
def connect(url, name):
try:
connect_device(url)
start_app(name)
except [DeviceConnectionError, AdbError]:
print('connect error')
else:
print('connect success')
2、utils/login_wechat.py
__author__ = 'xiao'
from poco.drivers.android.uiautomation import AndroidUiautomationPoco
from poco.exceptions import PocoNoSuchNodeException
from utils import resolve_yaml
from utils.wait_node import *
poco = AndroidUiautomationPoco()
config = resolve_yaml.resolve('./config/setting.yaml')
# password login
def login_with_passwo
自动化微信消息发送与页面翻页脚本

该博客介绍了一个使用Airtest和Poco库实现的自动化脚本,用于连接设备、登录微信并自动发送消息。脚本通过解析YAML配置文件获取参数,并使用循环等待节点的方法实现页面元素的定位和交互。当检测到重复消息时,脚本会自动发送预设文本并翻页。整个流程包括设备连接、密码登录、消息过滤和发送、页面滑动等步骤。
最低0.47元/天 解锁文章
2129

被折叠的 条评论
为什么被折叠?



