fix: 补注册弹窗自动关闭两个能力

This commit is contained in:
yu 2026-10-28 17:41:57 +08:00
parent 560134171f
commit 4c84674b29

View File

@ -71,4 +71,16 @@ register(["Element_ElementAarray", "Element_ElementCaptureSimilar"], async (ctx,
});
ctx.log("已获取 " + references.length + " 个相似元素(数组)", "info", node.id);
return references;
});\n\nregister("Element_StartAutoClosePopup", async (ctx, node) => {
const browser = await browserSession();
const started = browser.startAutoCloseDialogs();
ctx.log(started ? "弹窗自动关闭已开启" : "弹窗自动关闭已在运行中", "info", node.id);
return { active: true, started };
});
register("Element_StopAutoClosePopup", async (ctx, node) => {
const browser = await browserSession();
const stopped = browser.stopAutoCloseDialogs();
ctx.log(stopped ? "弹窗自动关闭已停止" : "弹窗自动关闭未在运行", "info", node.id);
return { active: false, stopped };
});