medium10 pts · first answer countsplaywrighte2e-testing
Flaky end-to-end test with fixed waits
A Playwright test clicks Save, waits 3 seconds and then checks for a success message. It fails randomly on CI. What is the better approach?
await page.getByRole('button', { name: 'Save' }).click()
await page.waitForTimeout(3000)
expect(await page.locator('.toast').isVisible()).toBe(true)Discussion 0
Join free to post in the discussion.
Related questions
- Flaky end-to-end testFull Stack Developer
- Flaky Playwright visibility checkQA Engineer
- Strict mode violationQA Engineer
- A missing awaitAutomation Test Engineer
- Browsers Playwright coversAutomation Test Engineer
- Using the trace viewerAutomation Test Engineer
- Web-first assertionsAutomation Test Engineer
- Speeding up logged-in testsAutomation Test Engineer