You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:
test('can we export it to PDF?',async()=>{const[popup]=awaitPromise.all([page?.waitForEvent('popup'),page.click('button:has-text("Export as PDF")')]);awaitpopup.waitForNavigation({waitUntil: 'networkidle',timeout: 5000,});expect(awaitpopup.url().startsWith('blob')).toBeTruthy();});
Describe the bug
Basically, this script clicks a button which opens a new tab with a blob:https://URL_EXAMPLE_OF_PDF of a PDF. When it's in non-headless mode, you can see it and it works. Tests pass. When it's in headless mode, the test fails like so:
TimeoutError: page.waitForNavigation: Timeout 5000ms exceeded.
=========================== logs ===========================
waiting for navigation until "networkidle"
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
at node_modules/playwright/lib/client/waiter.js:49:51
at Waiter.waitForPromise (node_modules/playwright/lib/client/waiter.js:57:28)
at node_modules/playwright/lib/client/frame.js:120:36
at Frame._wrapApiCall (node_modules/playwright/lib/client/channelOwner.js:77:28)
The text was updated successfully, but these errors were encountered:
Context:
Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:
Describe the bug
Basically, this script clicks a button which opens a new tab with a
blob:https://URL_EXAMPLE_OF_PDF
of a PDF. When it's in non-headless mode, you can see it and it works. Tests pass. When it's in headless mode, the test fails like so:The text was updated successfully, but these errors were encountered: