This commit is contained in:
2025-08-15 19:51:02 +08:00
parent 6332bda929
commit da2ac45177
6 changed files with 247 additions and 79 deletions

View File

@@ -270,7 +270,8 @@ class AiUtils(object):
# 查找app主页上的收件箱按钮
@classmethod
def getMsgBoxButton(cls, session: Client):
box = session.xpath("//XCUIElementTypeButton[name='a11y_vo_inbox']")
# box = session.xpath("//XCUIElementTypeButton[name='a11y_vo_inbox']")
box = session(xpath='//XCUIElementTypeButton[@name="a11y_vo_inbox"]')
if box.exists:
return box
else:
@@ -280,6 +281,7 @@ class AiUtils(object):
@classmethod
def getUnReadMsgCount(cls, session: Client):
btn = cls.getMsgBoxButton(session)
print(f"btn:{btn}")
return cls.findNumber(btn.label)
# 获取聊天页面的聊天信息