- Symptom
- page.waitForEvent('download') times out on a PDF link because the PDF opens inlinetoHaveScreenshot diffs across the whole suite with no app changeTests pass in default headless Chromium and fail with channel: 'chrome'
- Cause
- Chrome and Edge removed old headless, so branded channels now run the new headless mode, which renders PDFs in the page and paints differently. Default Playwright Chromium uses a separate headless shell and is not affected.
- Fix
- Assert on the opened PDF page or fetch the file with the request API instead of waiting for a download, and regenerate screenshot baselines per channel.
- Apply
const res = await page.request.get(pdfUrl) expect(res.headers()['content-type']).toContain('application/pdf') // then: npx playwright test --update-snapshots --project='Google Chrome'- Affected
- Playwright 1.49 and later with channel chrome, chrome-beta, msedge and similar
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders