My PlaywrightTestConfig file has a global timeout setting of 2 minutes. However, in a specific test case, I need to wait for 10 minutes for a file validation process to complete.
const config: PlaywrightTestConfig = {
// Timeout for each Playwright action in milliseconds. Defaults to 0 (no timeout)
timeout: 120000
...
}
I have attempted various methods to override the global timeout:
- click({ timeout: 600000 });
- test.slow();
- test.setTimeout(600000);
- page.setDefaultTimeout(600000);
- page.setDefaultNavigationTimeout(600000);
Unfortunately, regardless of these efforts, the test still times out after 2 minutes instead of the intended 10-minute override (600000).
Increasing the global timeout might seem like a solution, but it would slow down the entire test suite, which is not ideal.
Is there a way to set a step-specific timeout that exceeds the global timeout?