Playwright locators already auto-wait for visibility and actionability. Most fixed sleeps are leftovers from debugging.
Quick audit: grep your repo for waitForTimeout. Every hit is a flaky test waiting to happen.
How many does yours have?
The most common cause of flaky E2E tests we see:
await page.waitForTimeout(2000);
await https://t.co/zM6IXOLXxZ('#submit');
2 seconds is enough on a laptop. Not on a busy CI runner behind a slow API. The test fails for reasons that have nothing to do with your product.
Bumping it to 5s doesn't fix it. The suite gets slower and the failure gets rarer, so nobody can reproduce it.
Wait for a state, not a duration:
await expect(page.getByRole('button', { name: 'Submit' })).toBeEnabled();
Most E2E suites don't die from bad tests.
They die from neglect: a renamed class, a moved button, and suddenly nobody trusts CI.
Writing Playwright tests is easy. Keeping them alive is the job.
That's what we do at Zeronaut.
We build your critical flows as Playwright tests, then keep them green as your UI changes.
Our tool QAZero fingerprints elements instead of relying on CSS selectors, so a redesign doesn't break your suite.
Test automation that doesn't rot. We build Playwright tests for your critical flows and keep them green as your product changes. Free 30-min flaky-flow review: https://t.co/RNt0nkoBKm