> For the complete documentation index, see [llms.txt](https://docs.zerowork.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerowork.io/using-zerowork/using-building-blocks/check-web-element.md).

# Check Web Element

<figure><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2FeWtTPNdJk4GZB8rH7Fhq%2Fcheck_web_element_block.png?alt=media&amp;token=0a369465-d587-4442-906c-d2c34ff3118b" alt="" width="375"><figcaption></figcaption></figure>

The **Check Web Element** block tests whether a web element is on the browser's active page and sends your TaskBot down one of two paths (**Found** or **Not Found**) depending on the answer. It's how a TaskBot reacts to what's actually on the page instead of assuming.

This is a branching block. When you drag it onto the canvas it arrives with two outcomes already attached: a **Found** node and a **Not Found** node. You don't add or remove them; you build each path by connecting the steps that should run when the element is present to **Found**, and the steps for when it isn't to **Not Found**.

{% hint style="success" %}
Unlike [Click Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element), this block never fails when the element is missing; "not there" is simply one of its two outcomes, each with its own path on the canvas.
{% endhint %}

## How To Use It

<figure><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2FBYIelXJaB7a0NrJinfXW%2Fcheck_web_element_settings.png?alt=media&amp;token=0bcda4fb-f85a-4352-ad70-a2c71da5f792" alt=""><figcaption></figcaption></figure>

### Web Element Selector

The CSS or XPath selector to look for. See [Using Selectors](https://docs.zerowork.io/using-zerowork/using-selectors).

{% hint style="info" %}
If the selector matches more than one element, a match on any of them counts as **Found**.
{% endhint %}

#### Timeout

How long to wait for the element before deciding, in seconds. The default is a deliberately low **1.5 seconds**.

{% hint style="warning" %}
A **Not Found** result waits out the *full* timeout before deciding the element isn't there, which is why the default is short. Only raise it when the element you're checking for can take a while to appear; doing so makes every Not Found result that much slower.
{% endhint %}

### Selector must be visible on screen

Controls what counts as **Found**:

* **Unchecked** (default): the element counts as found if it exists anywhere in the page's HTML, even if it's hidden.
* **Checked**: the element counts as found only if it's actually **visible** on the page.

#### Block-level Delays

**Min sec** and **Max sec** represent a pause after the check completes, before the next block runs. The wait is randomized between the two values, and setting both to the same number makes it fixed. This block defaults to **0**, meaning no pause.

{% hint style="info" %}
See the [Delay](https://docs.zerowork.io/using-zerowork/using-building-blocks/delay) block for how these two fields behave, including decimals, references, and what happens when a field is left empty. See [Delay Times between the Building Blocks](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/delay-times-between-the-building-blocks) for how block-level delays fit into a TaskBot's run.
{% endhint %}

## Things To Know

* **It never fails on a missing element.** Where [Click Web Element](/using-zerowork/using-building-blocks/click-web-element.md) stops the run if the element isn't there, this block simply takes the **Not Found** path. That's the whole point; it's a question, not an action.
* **A "Not Found" costs the full timeout.** Deciding that something *isn't* there means waiting until the **Timeout** runs out. Keep the timeout short for checks you expect to fail often.
* **Found doesn't always mean usable.** With **Selector must be visible on screen** off (the default), a Found element may still be hidden; a following [Click Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element) or Save Web Element can then fail because those need it visible. If the next step interacts with the element, turn it on. See [Check Web Element identifies selector as found but next action does not](https://docs.zerowork.io/using-zerowork/common-problems/check-web-element-identifies-selector-as-found-but-next-action-does-not).
* **It only reads; it changes nothing.** This block never clicks, types, or navigates. It's safe to use as often as you like.

## Block Behavior

**When the element is found** the block takes the **Found** path and logs the result in a TaskBot's [Run Reports](/using-zerowork/using-run-reports.md).

**When the element isn't found within the timeout** the block takes the **Not Found** path.

**When Selector must be visible on screen is on** only a visible element counts as found; a hidden-but-present element takes the **Not Found** path.

## Video Tutorial

{% embed url="<https://youtu.be/3a0BSJqVGcg?si=90rB9Vlv1GwseFCX>" %}
