> 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/bugbug-ai-test-recorder.md).

# Test automation recorder

Learn how BugBug overlay works while recording your test. Record all clicks, catch selecting form elements, navigate to URLs and record typing in the text fields.

The BugBug [test automation recorder](https://bugbug.io/test-automation-recorder/) in a form of Chrome extension records your interactions with a web app and turns them into automated test steps. Three **AI capabilities** run automatically in the background during every recording, no configuration needed.

{% hint style="info" %}
To run or record the tests, you need to install[ **BugBug Chrome extension**](/quick-start/install-test-recorder.md)**.**
{% endhint %}

### Recording overlay

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2F0f7gYBagRe3vXBfuEJKi%2Fdownload.webp?alt=media&amp;token=c75d7495-4747-46b3-a4a6-829d5fde435a" alt=""><figcaption><p>AI-assisted test automation recorder</p></figcaption></figure>

When recording starts, a BugBug panel appears on the right side of the page. By default, BugBug captures all clicks, form inputs, URL navigation, and keyboard typing automatically.

Use the panel buttons to record additional action types:

* [Assertion](/editing-tests/assertions.md) - to check that specific content is visible on the page
* [Hover](/recording-tests-steps/recording-hover.md) - for menus or elements that only appear on mouse-over
* [Use email testing inbox](https://docs.bugbug.io/editing-tests/variables#user-registration-and-login-using-the-bugbug-testing-inbox) - test signup and login flows with built-in email testing inbox
* [Variables](/editing-tests/variables.md) - for inserting dynamic pieces of text that you can use in your tests
* [Drag & drop](about:blank) - for drag-based interactions

{% hint style="info" %}
Learn more about BugBug [**test automation recorder**](https://bugbug.io/test-automation-recorder/)**.**
{% endhint %}

### What gets recorded automatically

| Action                                 | Recorded automatically?            |
| -------------------------------------- | ---------------------------------- |
| Clicks                                 | Yes                                |
| Keyboard typing                        | Yes                                |
| Form selection (dropdowns, checkboxes) | Yes                                |
| URL navigation                         | Yes                                |
| Hover                                  | Must be added manually via overlay |
| Scroll                                 | Yes                                |
| Drag & drop                            | Must be added manually via overlay |

{% hint style="warning" %}
**Important!** To maintain test independence, BugBug launches each test in a fresh incognito window, ensuring a clean session free of cookies, cache, and local storage.
{% endhint %}

### Recorder's AI capabilities

#### Adaptive Locators

When you click an element, BugBug generates multiple selectors and uses AI to pick the most stable one. It prioritizes data-testid attributes, semantic roles, and visible text — avoiding fragile dynamic IDs or positional CSS that break when the UI changes.

You don't need to write or edit any selectors. BugBug handles it during recording.

{% hint style="info" %}
Learn more about [Selectors](/preventing-failed-tests/selectors.md#adaptive-locators)
{% endhint %}

#### Smart Click & Scroll

BugBug mimics real user behavior instead of dispatching raw JavaScript events. Before each click, it checks whether the element is visible and reachable, retries if it's temporarily covered (e.g. by a cookie banner or animation), and automatically scrolls the page to bring the element into the viewport.

{% hint style="info" %}
Learn more about [Smart click](/preventing-failed-tests/smart-click.md) & [Smart scroll](/preventing-failed-tests/smart-scroll.md)
{% endhint %}

#### Smart Waiting

Before each test step, BugBug checks a series of conditions: Is the page done loading? Is the element visible? Is it finished animating? Is it active (not disabled)?

If the conditions aren't met yet, BugBug waits — so you don't need to add manual delay steps or tune timeouts.

{% hint style="info" %}
Learn more about [Waiting conditions](/preventing-failed-tests/waiting-conditions.md)
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bugbug.io/recording-tests-steps/bugbug-ai-test-recorder.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
