> ## Documentation Index
> Fetch the complete documentation index at: https://docs.testbrick.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Recording Tests

> Capture browser interactions with the Chrome extension

# Recording Tests

The TestBrick Chrome extension records your browser interactions as test steps. Every click, keystroke, and navigation is captured automatically.

## Install the extension

1. Install the [TestBrick Chrome Extension](https://chrome.google.com/webstore) from the Chrome Web Store
2. Sign in with your TestBrick account
3. The extension icon appears in your browser toolbar

## Start recording

1. Open a UI test file in TestBrick
2. Click **Record** in the toolbar
3. Navigate to your app — the extension starts capturing

## What gets recorded

| Interaction              | Captured as                       |
| ------------------------ | --------------------------------- |
| Click a button           | Click step with element locators  |
| Type in an input         | Fill step with the typed value    |
| Navigate to a page       | Navigate step with the URL        |
| Select a dropdown option | Select step with the chosen value |
| Upload a file            | Upload file step                  |
| Press Enter/Tab          | Press key step                    |

## Locator strategies

Each recorded step captures multiple ways to find the element, in priority order:

1. **QA ID** — `data-qa-id` attribute (most reliable)
2. **Role + Name** — semantic ARIA role (e.g., button "Submit")
3. **Test ID** — `data-testid` attribute
4. **Label** — associated form label
5. **Placeholder** — input placeholder text
6. **CSS Selector** — class/ID based
7. **XPath** — full path (last resort)

During replay, TestBrick tries each strategy until one finds the element. This makes tests resilient to minor UI changes.

## Stop recording

Click **Stop Recording** or close the extension popup. Your recorded steps appear in the test file.

<Tip>
  Add `data-qa-id` attributes to important elements in your app for the most reliable test recordings.
</Tip>
