fix(verify): 预算版本UI浏览器验证脚本加 tab 导航等待 (about:blank竞态,复跑必挂修复)

This commit is contained in:
Hermes CI Fix
2026-09-07 11:34:56 +08:00
parent f8018aa471
commit 616f444564
@@ -142,7 +142,13 @@ def main():
c = CDP(ws) c = CDP(ws)
c.call("Page.enable") c.call("Page.enable")
c.call("Runtime.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 # 1) 登录博海 entity=2
r = login_via_fetch(c, 2) r = login_via_fetch(c, 2)