> 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/stop-when-element-is-displayed.md).

# Stop When Element Is Displayed

Stop When Element Is Displayed ends the remaining steps in the Test Case when the [Element](/elements/creating-elements.md) is shown. Use it as a conditional exit when later steps only apply if that UI never appeared.

See [Element states](/test-step-options/element-states.md) for how Displayed is evaluated.

![Stop when element is displayed Test Step](https://app.does.qa/screenshots/node/runner_stop_elementDisplayed.png)

## When to use it

* End the Flow early once a success banner or confirmation panel appears.
* Skip cleanup steps when an error message is already shown.
* Pair with [Stop When Element Not Displayed](/test-steps/runner/stop-when-element-not-displayed.md) on another branch of the same journey.

## Configure

### Basics

| Field       | What to set                                            |
| ----------- | ------------------------------------------------------ |
| **Element** | The [Element](/elements/creating-elements.md) to watch |

### Advanced

| Field                                 | What to set                                          |
| ------------------------------------- | ---------------------------------------------------- |
| **Status on fail**                    | [Failed Status](/test-step-options/failed-status.md) |
| **When should screenshots be taken?** | `Always` or `On Failures` (default)                  |

## Related

* [Stop When Element Not Displayed](/test-steps/runner/stop-when-element-not-displayed.md)
* [Stop When Value](/test-steps/runner/stop-when-value.md)
* [Element states](/test-step-options/element-states.md)
* [Runner](/test-steps/runner.md)

**Tags:** `runner`, `stop`, `elementDisplayed`, `state`
