Skip to main content

Common Issues

Issue: Elements not found or interactions failingSolutions:
  1. Use browser dev tools to test selectors
  2. Add explicit waits for dynamic content
  3. Use more specific or stable selectors
  4. Check for iframe or shadow DOM elements
Issue: Tests failing due to timing issuesSolutions:
  1. Use waitForSelector() instead of fixed delays
  2. Wait for network requests to complete
  3. Use waitForLoadState() for page readiness
  4. Implement proper error handling and retries
Issue: Login failures or session timeoutsSolutions:
  1. Verify credentials are correct and active
  2. Handle multi-factor authentication scenarios
  3. Use session storage for authentication state
  4. Test login flow separately from main workflow
Issue: Tests timing out or running too slowlySolutions:
  1. Optimize page load performance
  2. Increase timeout values for slow operations
  3. Use parallel execution where possible
  4. Monitor and alert on performance degradation
Issue: A result has no trace or video, or some pages have no videoSolutions:
  1. Check whether the run failed. Scheduled runs keep the trace and video only when the check fails. Runs from the editor keep them whether the check passes or fails, and so do runs you record with npx checkly test --record or npx checkly trigger --record. See Viewing trace files.
  2. Don’t rely on the trace and video options in your Playwright configuration. Browser checks ignore them, so you can’t keep artifacts for passing scheduled runs or turn off video recording. To control them, use a Playwright Check Suite and set use.trace and use.video.
  3. Open pages from the test’s own page or context fixture. Playwright records one video per page in that context. Pages from a context you create with browser.newContext() have no video. See Playwright’s videos guide.
  4. Set a test timeout below the 240-second run limit, for example test.setTimeout(210000). A test that times out on its own test timeout keeps its trace and video. A test still running when the check reaches the run limit is stopped without them. See Browser check timeouts.

Error Handling and Debugging