# Assert

Throws an error if the condition is not met

#### **Conditions**

See [Conditions](/guides/conditions.md) page

### Use cases

#### Use case: Verify intermediate results during a flow

Asserts can be used to verify that certain steps in a flow completed successfully. For example, if your flow submits a form, you can use `Assert` to check that some success text (e.g. "Your form was submitted successfully!") appears on the page.

#### Use case: End-to-end testing

Asserts can be used to test functionality in websites and web apps. For example, if you wanted to create a test to ensure that clicking the "Sign up" button on your home page takes the user to the sign up page, you can use `Assert` to check the result of [Get Page URL](/reference/browserflow-commands/extract-data/get-page-url.md) after clicking the button.

### Video demo

{% embed url="<https://www.loom.com/share/d57dc6f416204733b83fce48ab1ada62>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.browserflow.app/reference/browserflow-commands/utilities/assert.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
