fix(web-test): auto-accept native browser dialogs (confirm/alert)

1C web client uses native confirm() for scripts like vis.js file
access. Without handling, these block Playwright execution.
Added page.on('dialog') handler to auto-accept.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-03-17 18:34:05 +03:00
parent 38ccded7d9
commit 46f0e6be8c
@@ -122,6 +122,9 @@ export async function connect(url, { extensionPath } = {}) {
page = await context.newPage();
}
// Auto-accept native browser dialogs (confirm/alert from 1C scripts like vis.js)
page.on('dialog', dialog => dialog.accept().catch(() => {}));
// Capture seanceId from network requests for graceful logout
sessionPrefix = null;
seanceId = null;