Hi all, This test works in headed mode, but do not work in headless mode. Never.
Any tips?
await page.getByText('Imprimir').click()
const pagePromise = context.waitForEvent('page'); await page.getByRole('link', { name: 'Guia de Reparação' }).click();
const newPage = await pagePromise; await newPage.waitForLoadState(); await expect(newPage).toHaveURL(/guia/,url);
Error:
Error: page.waitForLoadState: Test timeout of 200000ms exceeded. at tests\MM\CriarGuiaMM.spec.js:21:17
Execution log
"networkidle" event fired
This thread is trying to answer question "Why does the toHaveURL validation test work in headed mode but not in headless mode, and how can this issue be resolved?"
Hi, have you tried recording a trace and viewing it with the trace viewer? https://playwright.dev/docs/trace-viewer-intro
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].