Wait for registered monitor error detail

This commit is contained in:
Codex
2026-07-08 07:56:34 +02:00
parent d500c59255
commit 7f8f9307a9
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -1219,7 +1219,8 @@ if (expectedErrorId) {
for (let index = 0; index < 120; index += 1) {
const dialog = document.querySelector("[data-check-dialog='true']");
const dialogErrorId = dialog?.getAttribute("data-error-id") || "";
if (dialog instanceof HTMLElement && dialogErrorId === errorId) return { requestedErrorId: errorId, ok: true, reason: "dialog-open" };
const title = String(document.querySelector("#check-dialog-title")?.textContent || "").replace(/\s+/g, " ").trim();
if (dialog instanceof HTMLElement && dialogErrorId === errorId && title && title !== "未登记监测项") return { requestedErrorId: errorId, ok: true, reason: "dialog-open-registered" };
const row = document.querySelector('[data-error-id="' + CSS.escape(errorId) + '"]');
if (row instanceof HTMLElement) row.click();
await wait(150);