---
title: "Click an element in a web test"
sidebarTitle: "Click"
description: "Click an element on the page: a button, a link, a menu entry. Describe it in plain language for the AI, or pin it with an XPath or CSS selector."
lastUpdated: "2026-09-23"
---

> **For AI agents:** the complete documentation index is at [llms.txt](/llms.txt). Append `.md` to any page URL for its markdown version.

Click an element on the page: a button, a link, a menu entry. Describe the element in plain language and the AI finds it, or pin it down yourself with an XPath or CSS selector.

## Parameters

| Parameter | Required | Description |
| ----------- | ---------- | ------------- |
| Target element | Yes, unless a manual selector is set | Natural-language description of the element. The AI uses it to find the element, for example "The Log in button in the header". |
| Manual selector | No | XPath or CSS selector, used when AI is disabled or as the saved selector. |
| AI usage | No | `inherit` (default, follows the test strategy), `smart`, or `always`. |
| Enable AI | No | When off, only the manual selector is used. Default: on. |
| Ignore error on this step | No | The run continues with the next step if this one fails. Default: off. |

How the AI resolves the element, and when it falls back to the saved selector, is covered in [AI selectors](/ai/selectors).

## Results and metrics

- **Timing**: start, end, and duration (in seconds) recorded in the step result.
- **Status**: success, warning, or failed, with the error message on failure.
- **Screenshot**: captured after the click, so you can see the page it led to.
- **Step checks**: URL, loading time, and step duration checks report their expected and actual values when configured.
- **AI usage**: if the AI located the element, the healed selector is saved on the test and the AI cost is added to the run.

## What's next?

<Columns cols={2}>
  <Card title="AI selectors" icon="sparkles" href="/ai/selectors">

    How element descriptions, saved selectors, and AI strategies work together

</Card>
  <Card title="Verify element" icon="eye" href="/tests/actions/web/verifyelement">

    Check the result of the click before moving on

</Card>
</Columns>
