hard20 pts · first answer countsplaywrightflaky-testsasync-javascript
Missing the response you wait for
This test sometimes times out even though the request succeeds. Why, and what is the fix?
await page.getByRole('button', { name: 'Search' }).click()
const res = await page.waitForResponse('**/api/search*')
expect(res.ok()).toBeTruthy()Discussion 0
Join free to post in the discussion.
Related questions
- A missing awaitAutomation Test Engineer
- What makes a test flakyAutomation 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
- Click intercepted by an overlayAutomation Test Engineer
- A custom Playwright fixtureAutomation Test Engineer