> ## Documentation Index
> Fetch the complete documentation index at: https://www.checklyhq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Fix "Wait Not Respected" Error in Playwright

> Fix Playwright waits that seem ignored, usually because the element already matches your state requirement, and confirm element state in the browser console.

> [!TIP]
>
> If you're using Playwright for end-to-end testing, you should check out [Playwright Check Suites](https://www.checklyhq.com/docs/detect/synthetic-monitoring/playwright-checks/overview.md) and start testing in production.

Our script might sometimes look as if it were not honoring the waits we are specifying, instead proceeding and potentially running into an error on the next instruction.

For example: we are waiting for an element, e.g. with `page.waitForSelector`, but the script immediately proceeds to the next instruction. This can result in an [element not found error](#element-not-found) or similar on the following step in our script.

## Possible causes

* **Not-so-obvious possible cause:** the element we are waiting for is already in the DOM, possibly not visible in our inspection but already matching our `state` requirements.

## How to avoid confusion

Try querying for the element in the browser console during inspection. If the element is found, inspect its attributes (e.g. `visibility`) and ensure they match your expectations.

> Note that this list neither is nor aims to be complete: additional possible causes most likely exist for this error.

Bugs don't stop at CI/CD. Why would Playwright? ![Playwright logo](https://mintcdn.com/checkly-422f444a/EbiaOE1oHX_3_YEg/images/icons/playwright.svg?fit=max\&auto=format\&n=EbiaOE1oHX_3_YEg\&q=85\&s=7a281b91e55b4aa6c01bbb63be50402c)

[Sign up](https://app.checklyhq.com/signup) and start using Playwright for end-to-end monitoring with Checkly.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.