Wait for registered monitor error detail
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user