From 4c84674b29e017c4f26341746a80e3bcf009536f Mon Sep 17 00:00:00 2001 From: yu <191972707@qq.com> Date: Wed, 28 Oct 2026 17:41:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E6=B3=A8=E5=86=8C=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E8=87=AA=E5=8A=A8=E5=85=B3=E9=97=AD=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/capabilities/web-batch2.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/capabilities/web-batch2.ts b/src/main/capabilities/web-batch2.ts index db61113..b18624a 100644 --- a/src/main/capabilities/web-batch2.ts +++ b/src/main/capabilities/web-batch2.ts @@ -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 }; });