From 0c210be9b1f2ebf605dfa797fcc7f7fdc2462ee9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Sep 2025 05:51:41 +0000 Subject: [PATCH 1/2] Initial plan From 8b84aca06d22cc4d82ccdb07cbc880af52751907 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Sep 2025 06:04:21 +0000 Subject: [PATCH 2/2] Changes before error encountered Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com> --- lib/helper/Playwright.js | 3 +++ lib/helper/Puppeteer.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index 70b4f6c14..6c7df45c0 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -642,6 +642,9 @@ class Playwright extends Helper { async _after() { if (!this.isRunning) return + // Clear popup state to prevent leakage between tests + popupStore.clear() + if (this.isElectron) { this.browser.close() this.electronSessions.forEach(session => session.close()) diff --git a/lib/helper/Puppeteer.js b/lib/helper/Puppeteer.js index 35115ab00..3a23b5f7f 100644 --- a/lib/helper/Puppeteer.js +++ b/lib/helper/Puppeteer.js @@ -330,6 +330,9 @@ class Puppeteer extends Helper { async _after() { if (!this.isRunning) return + // Clear popup state to prevent leakage between tests + popupStore.clear() + // close other sessions const contexts = this.browser.browserContexts() const defaultCtx = contexts.shift()