From f5c02144cb93d00dafa80f110d879cc7bc115beb Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Fri, 27 Mar 2026 12:49:20 +0300 Subject: [PATCH] =?UTF-8?q?fix(web-test):=20refine=20confirmation=20pause?= =?UTF-8?q?=20=E2=80=94=20remove=20from=20clickElement,=20reduce=20to=2050?= =?UTF-8?q?0ms=20in=20closeForm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clickElement confirmation handling is cleanup of stale dialogs — no pause needed. closeForm confirmation is intentional user action — keep 500ms pause during recording (on top of ~600ms from waitForStable = ~1.1s total dialog visibility). Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/skills/web-test/scripts/browser.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.claude/skills/web-test/scripts/browser.mjs b/.claude/skills/web-test/scripts/browser.mjs index db3f9c68..f8b79403 100644 --- a/.claude/skills/web-test/scripts/browser.mjs +++ b/.claude/skills/web-test/scripts/browser.mjs @@ -1939,7 +1939,6 @@ export async function clickElement(text, { dblclick, table, toggle, expand, time return { error: 'not_found', available: btns.map(el => norm(el.innerText)).filter(Boolean) }; })()`); if (btnResult?.error) throw new Error(`clickElement: "${text}" not found among confirmation buttons. Available: ${btnResult.available?.join(', ') || 'none'}`); - if (recorder) await page.waitForTimeout(1500); // show confirmation dialog to viewer during recording await page.mouse.click(btnResult.x, btnResult.y); await waitForStable(); const state = await getFormState(); @@ -2275,7 +2274,7 @@ export async function closeForm({ save } = {}) { for (const b of btns) { const txt = (await b.textContent()).trim(); if (txt === label) { - if (recorder) await page.waitForTimeout(1500); // show confirmation to viewer during recording + if (recorder) await page.waitForTimeout(500); // show confirmation to viewer during recording await b.click({ force: true }); await waitForStable(beforeForm); break;