Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(playwright): Add missing await on page.evaluate (#1063)
Hi, This missing await causes us many, hard to debug problems, when page has been closed prematurely (popup or terminating analysis if too long) Simple reproduction : ```ts (async () => { const browser = await playwright.chromium.launch({ headless: true }); const context = await browser.newContext(); const page = await context.newPage(); await page.close(); try { const results = await new AxeBuilder({ page }).analyze(); console.log(results); } catch (error) { console.error(error); } await browser.close(); })(); // node:internal/process/promises:279 triggerUncaughtException(err, true /* fromPromise */); ^ page.evaluate: Target page, context or browser has been closed ``` I haven't been able to write a simple test that reproduce the problem but I can reproduce it in my project and adding that await fixed all my problems No QA needed
- Loading branch information