From 616f444564e6209d14ab27825c9a124bcec18e77 Mon Sep 17 00:00:00 2001 From: Hermes CI Fix Date: Mon, 7 Sep 2026 11:34:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(verify):=20=E9=A2=84=E7=AE=97=E7=89=88?= =?UTF-8?q?=E6=9C=ACUI=E6=B5=8F=E8=A7=88=E5=99=A8=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E5=8A=A0=20tab=20=E5=AF=BC=E8=88=AA=E7=AD=89?= =?UTF-8?q?=E5=BE=85=20(about:blank=E7=AB=9E=E6=80=81,=E5=A4=8D=E8=B7=91?= =?UTF-8?q?=E5=BF=85=E6=8C=82=E4=BF=AE=E5=A4=8D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/scripts/verify_budget_versions_ui_browser.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/scripts/verify_budget_versions_ui_browser.py b/backend/scripts/verify_budget_versions_ui_browser.py index 8f25964a..6c671897 100644 --- a/backend/scripts/verify_budget_versions_ui_browser.py +++ b/backend/scripts/verify_budget_versions_ui_browser.py @@ -142,7 +142,13 @@ def main(): c = CDP(ws) c.call("Page.enable") c.call("Runtime.enable") - time.sleep(4) + # 等待页面导航到 cma 域完成(约 blank → login 竞态修复,2026-09-07 复跑实测: + # Target.createTarget 后偶发停留在 about:blank → 访问 localStorage 抛 SecurityError) + nav = wait_for(c, "location.hostname === 'cma.sxbh.ltd'", timeout=25) + if not nav: + print("FAIL: 页面未导航到 cma.sxbh.ltd") + sys.exit(1) + time.sleep(3) # 1) 登录博海 entity=2 r = login_via_fetch(c, 2)