WechatOnCloud/bridge/woc_bridge/ui/profiles/wechat_4.0_1435x876.yaml
Kris 054c4676aa refactor: 重构发送校验逻辑,移除DB轮询与熔断器,改用SSE校验
主要变更:
1. 新增SSEVerifyBus实现基于推送的发送结果校验,替代原DB轮询方案
2. 移除FlowOrchestrator中的DB熔断器,避免雪崩风险
3. 重构SendTextFlow,改用SSE校验流程,删除原DB校验相关代码
4. 新增RoiSpec与ROI搜索支持,优化UI元素匹配精度
5. 更新所有分辨率配置文件,添加ROI配置与调整搜索框坐标
6. 新增WOC_DISABLE_OPENCV环境变量开关,支持纯几何定位模式
7. 清理FlowContext中废弃的before_msg_id字段
2026-07-17 23:50:03 +08:00

224 lines
5.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 微信 4.0 UI 自动化 Profile - 1435x876 分辨率
#
# 适用场景VNC/实际桌面分辨率为 1435x876 时运行微信 4.x。
# 该分辨率为 bridge 运行环境实测常见值1920x1080 经标题栏/缩放后约为 1435x876
# 坐标基于截图标定relative_to 统一使用 window 语义(与 Actions._geom_find 实现一致)。
#
# 字段说明:
# by_image: 模板文件名(相对 templates/wechat_4.0/light/
# by_geom: 几何兜底规格(图像匹配失败或熔断时使用)
# relative_to: window / window_bottom_right当前统一按 window 处理)
# x_ratio / y_ratio: 相对窗口宽高的比例位置
# x_offset / y_offset: 绝对像素偏移(含正负号)
# roi: 图像匹配感兴趣区域(可选,缺省=全窗口)
# 将 OpenCV 模板匹配限制在窗口的某个子区域,避免误匹配到窗口其他
# 视觉相似的 UI 元素。所有字段为相对窗口宽/高的比例0.0~1.0
# 与分辨率无关3 个 profile 共用相同比例值。
# x_ratio / y_ratio: ROI 左上角相对窗口左上角的比例
# w_ratio / h_ratio: ROI 宽/高相对窗口宽/高的比例
# threshold: 图像匹配置信度阈值
# require_image: true 时图像失败拒绝执行(高风险元素)
# description: 元素描述
# 会话管理图标:左侧导航栏最上方(头像下方第一个)微信消息图标。
# 每次发送前点击它,强制回到会话列表首页,清除搜索覆盖层/弹窗/非会话页面。
session_manager_icon:
by_image: session_manager_icon.png
by_geom:
relative_to: window
x_ratio: 0.018
y_ratio: 0.109
x_offset: 0
y_offset: 0
roi:
x_ratio: 0.0
y_ratio: 0.0
w_ratio: 0.10
h_ratio: 0.25
threshold: 0.80
require_image: false
description: 左侧导航栏顶部微信消息/会话管理图标
search_box:
by_image: search_box.png
by_geom:
relative_to: window
# 基于 1435x876 实测截图标定:搜索框中心约 (115,45)
x_ratio: 0.080
y_ratio: 0.052
x_offset: 0
y_offset: 0
roi:
x_ratio: 0.0
y_ratio: 0.0
w_ratio: 0.30
h_ratio: 0.12
threshold: 0.80
require_image: false
description: 左侧顶部搜索框
send_button:
by_image: send_button.png
by_geom:
relative_to: window
x_ratio: 0.972
y_ratio: 0.929
x_offset: 0
y_offset: 0
roi:
x_ratio: 0.90
y_ratio: 0.85
w_ratio: 0.10
h_ratio: 0.15
threshold: 0.80
require_image: false
description: 右下角发送按钮
input_box:
by_image: input_box.png
by_geom:
relative_to: window
x_ratio: 0.743
y_ratio: 0.914
x_offset: 0
y_offset: 0
roi:
x_ratio: 0.55
y_ratio: 0.78
w_ratio: 0.45
h_ratio: 0.22
threshold: 0.80
require_image: false
description: 聊天输入框
input_box_empty:
by_image: input_box_empty.png
by_geom:
relative_to: window
x_ratio: 0.743
y_ratio: 0.914
x_offset: 0
y_offset: 0
roi:
x_ratio: 0.55
y_ratio: 0.78
w_ratio: 0.45
h_ratio: 0.22
threshold: 0.80
require_image: false
description: 空输入框灰色提示态(发送成功后校验用)
search_result_first:
by_image: search_result_first.png
by_geom:
relative_to: window
x_ratio: 0.078
y_ratio: 0.174
x_offset: 0
y_offset: 0
roi:
x_ratio: 0.0
y_ratio: 0.10
w_ratio: 0.30
h_ratio: 0.40
threshold: 0.80
require_image: false
description: 搜索结果第一项
main_view:
by_image: main_view.png
by_geom:
relative_to: window
x_ratio: 0.65
y_ratio: 0.50
x_offset: 0
y_offset: 0
threshold: 0.75
require_image: false
description: 主聊天视图post_verify 校验用,阈值略低因区域大;大区域无需 ROI 限制)
# 好友申请通过 UI 元素定位(基于 1435x876 实测标定)
contact_icon:
by_image: contact_icon.png
by_geom:
relative_to: window
x_ratio: 0.04
y_ratio: 0.171
x_offset: 0
y_offset: 0
roi:
x_ratio: 0.0
y_ratio: 0.05
w_ratio: 0.10
h_ratio: 0.30
threshold: 0.80
require_image: false
description: 左侧导航栏通讯录图标
new_friend_entry:
by_image: new_friend_entry.png
by_geom:
relative_to: window
x_ratio: 0.125
y_ratio: 0.138
x_offset: 0
y_offset: 0
roi:
x_ratio: 0.05
y_ratio: 0.10
w_ratio: 0.25
h_ratio: 0.20
threshold: 0.80
require_image: false
description: 通讯录页"新的朋友"入口
friend_request_item:
by_image: friend_request_item.png
by_geom:
relative_to: window
x_ratio: 0.125
y_ratio: 0.178
x_offset: 0
y_offset: 0
roi:
x_ratio: 0.05
y_ratio: 0.15
w_ratio: 0.30
h_ratio: 0.30
threshold: 0.75
require_image: false
description: '"新的朋友"列表第一条申请项'
verify_button:
by_image: verify_button.png
by_geom:
relative_to: window
x_ratio: 0.593
y_ratio: 0.394
x_offset: 0
y_offset: 0
roi:
x_ratio: 0.40
y_ratio: 0.20
w_ratio: 0.40
h_ratio: 0.40
threshold: 0.75
require_image: false
description: 好友详情页"前往验证"按钮OpenCV 实测标定)
confirm_button:
by_geom:
relative_to: window
x_ratio: 0.464
y_ratio: 0.830
x_offset: 0
y_offset: 0
roi:
x_ratio: 0.30
y_ratio: 0.65
w_ratio: 0.40
h_ratio: 0.30
threshold: 0.75
require_image: false
description: '"通过朋友验证"弹窗绿色确定按钮OpenCV 弹窗出现时实测 666/1435, 727/876'