This thread is trying to answer question "Why is the timeout for waitForURL() function not working as expected?"
The error is for test timeout. RTFM link : https://playwright.dev/docs/test-timeouts
You can change test timeout in config...
import { defineConfig } from '@playwright/test';
export default defineConfig({
timeout: 60_000,
});
or, in your test file...
test.setTimeout(60_000);
defineConfig({ timeout })
is the test timeout, that is, if your test doesn't complete within the given time limit, Playwright throws.
waitForURL({ timeout })
is the timeout for that particular call of waitForURL, that is, if URL is not reached within the specified time limit, Playwright throws.
Yeah. I got it. It means timeout of a wait function always must less than or equal the test timeout (by default is 30000ms). Thanks for your explaination.
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].