Next.js Discord

Discord Forum

Playwright e2e Test Fails: Can't Locate Cart Controls After Adding Item (Timeout)

Unanswered
Chow Chow posted this in #help-forum
Open in Discord
Chow ChowOP
Hey, having Playwright issues: my test adds an item to cart but keeps timing out when trying to find data-testid='count-controls' (waits many seconds). Manual testing works fine - elements exist and are interactive. Already tried:

Increasing timeouts

Waiting for API responses

Checking test IDs in production build
Any ideas why the test can't detect these elements? The HTML structure matches, but Playwright acts like the selectors are invalid.

0 Replies