From 90b3d5d2e9e91027d6f04f45d54d9f7924c80f13 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Tue, 3 Mar 2026 14:29:57 +0300 Subject: [PATCH] fix(web-test): require Message element for confirmation detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Forms with multiple buttons but no form{N}_Message element were falsely detected as confirmation dialogs. Real 1C confirmations (Да/Нет) always have a Message element. Now skip forms without it. Fixes false positives on small EPF forms with custom buttons. Co-Authored-By: Claude Opus 4.6 --- .claude/skills/web-test/scripts/dom.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.claude/skills/web-test/scripts/dom.mjs b/.claude/skills/web-test/scripts/dom.mjs index dfb34376..b931d4ca 100644 --- a/.claude/skills/web-test/scripts/dom.mjs +++ b/.claude/skills/web-test/scripts/dom.mjs @@ -889,8 +889,11 @@ export function checkErrorsScript() { if (elCount > 100) continue; // Skip large content forms if (buttons.length > 1) { // Confirmation dialog (multiple buttons: Да/Нет, OK/Отмена, etc.) + // Must have a Message element — real 1C confirmations always have form{N}_Message. + // Without it, this is just a regular form with multiple buttons (e.g. EPF form). const msgEl = document.getElementById(p + 'Message'); - const message = msgEl?.innerText?.trim() || ''; + if (!msgEl || msgEl.offsetWidth === 0) continue; + const message = msgEl.innerText?.trim() || ''; const btnNames = buttons.map(el => { const b = { name: el.innerText?.trim() || '' }; if (el.classList.contains('pressDefault')) b.default = true;