Merge remote-tracking branch 'origin/main'

# Conflicts:
#	.idea/workspace.xml
#	Module/DeviceInfo.py
#	Utils/ControlUtils.py
#	script/ScriptManager.py
This commit is contained in:
2025-09-18 13:11:50 +08:00
84 changed files with 414 additions and 412 deletions

View File

@@ -361,10 +361,12 @@ class ScriptManager():
else:
print(f"找不到输入框")
input.clear_text()
time.sleep(1)
# 输入主播id
input.set_text(f"{aid or '暂无数据'}\n")
input = session.xpath('//XCUIElementTypeSearchField')
if input.exists:
input.clear_text()
time.sleep(1)
# 输入主播id
input.set_text(f"{aid or '暂无数据'}\n")
# 定位 "关注" 按钮 通过关注按钮的位置点击主播首页
@@ -449,11 +451,11 @@ class ScriptManager():
time.sleep(2)
msgButton = AiUtils.getSendMesageButton(session)
time.sleep(2)
if msgButton is not None:
LogManager.method_info("找到发消息按钮了", "关注打招呼", udid)
print("找到发消息按钮了")
if msgButton.exists:
# 进入聊天页面
msgButton.click()
LogManager.method_info("找到发消息按钮了", "关注打招呼", udid)
print("找到发消息按钮了")
else:
LogManager.method_info("没有识别出发消息按钮", "关注打招呼", udid)
print("没有识别出发消息按钮")
@@ -492,9 +494,9 @@ class ScriptManager():
else:
msg = text
LogManager.method_info(f"即将发送的私信内容:{msg}", "关注打招呼", udid)
chatInput = session.xpath("//TextView")
# 准备发送一条信息
chatInput = session.xpath("//TextView")
if chatInput.exists:
chatInput.click()
time.sleep(2)

Binary file not shown.