> For the complete documentation index, see [llms.txt](https://docs.does.qa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.does.qa/test-steps/runner/wait-for-element-to-exist.md). Agents can also search and read this documentation through its [MCP server](https://docs.does.qa/~gitbook/mcp).

# Wait For Element To Exist

Wait for a specific element to exist.

Wait For Element To Exist waits until the [Element](https://docs.does.qa/elements/creating-elements.md) is present in the DOM. Use it when markup arrives before the UI is shown or scrolled into view.

See [Element states](https://docs.does.qa/test-step-options/element-states.md) for how Exists differs from Displayed and Visible.

![Wait for element to exist Test Step](https://static.does.qa/assets/nodes/action_wait_forElementExist.png)

## When to use it

* Wait for async HTML to inject a container before child steps run.
* Confirm a hidden input or off-screen node exists before reading its value.
* Prefer [Wait For Element To Be Displayed](https://docs.does.qa/test-steps/runner/wait-for-element-to-be-displayed.md) when the next step needs the Element shown to the user.

## Configure

### Basics

| Field       | What to set                                                                   |
| ----------- | ----------------------------------------------------------------------------- |
| **Element** | The [Element](https://docs.does.qa/elements/creating-elements.md) to wait for |

### Advanced

| Field                                 | What to set                                                                    |
| ------------------------------------- | ------------------------------------------------------------------------------ |
| **How fast is this typically?**       | [Timeout Override](https://docs.does.qa/test-step-options/timeout-override.md) |
| **Status on fail**                    | [Failed Status](https://docs.does.qa/test-step-options/failed-status.md)       |
| **When should screenshots be taken?** | `Always` or `On Failures` (default)                                            |

## Related

* [Wait For Element To Not Exist](https://docs.does.qa/test-steps/runner/wait-for-element-to-not-exist.md)
* [Wait For Element To Be Displayed](https://docs.does.qa/test-steps/runner/wait-for-element-to-be-displayed.md)
* [Element states](https://docs.does.qa/test-step-options/element-states.md)
* [Runner](https://docs.does.qa/test-steps/runner.md)

**Tags:** `action`, `wait`, `forElementExist`, `wait`, `time`, `sleep`, `pause`, `element`, `delay`, `state`
