> For the complete documentation index, see [llms.txt](https://docs.bugbug.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bugbug.io/recording-tests-steps/recording-assertions.md).

# Recording assertions

## What is an assertion?

You assert that some condition is met, and if it isn't, the test should fail.

## How to record an assertion?

You can add more advanced assertions manually - learn more about [assertions and their types](/editing-tests/assertions.md).

1. Start [recording test steps](/recording-tests-steps/bugbug-ai-test-recorder.md)
2. Click `Add assert`
3. Click the element that you want to check: every time the test is run BugBug will check if this element contains the same text or is visible on the page

<figure><img src="/files/VRktxIQXXnPZWuWc4BcS" alt=""><figcaption><p>Add assert option on the recorder</p></figcaption></figure>

You can also enable the "**Add multiple**" toggle, to select various elements on the page at once. Such as checking if all the elements are in place in the main navigation menu.

<figure><img src="/files/1Kk7YtDiZjYh82hllSSk" alt=""><figcaption><p>"Add multiple" toggle disabled</p></figcaption></figure>

<figure><img src="/files/qbYYwGHSrjrclkqxjbI7" alt=""><figcaption><p>"Add multiple" toggle enabled</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.bugbug.io/recording-tests-steps/recording-assertions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
