> For the complete documentation index, see [llms.txt](https://docs.testvibe.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.testvibe.com/create-tests/use-recorder.md).

# Use the Recorder

The recorder helps you capture a real browser journey and convert it into Gherkin you can review before saving.

Use it when describing a flow from memory would be slower than performing the flow once.

## When To Use The Recorder

The recorder is useful for:

| Situation                                | Why it helps                                            |
| ---------------------------------------- | ------------------------------------------------------- |
| A flow has many clicks or fields         | Recording captures the journey while you perform it.    |
| The UI labels are hard to remember       | The recorded flow can help produce more concrete steps. |
| You are documenting an existing workflow | You can walk through the product and review the output. |
| You want a first draft                   | The generated Gherkin can be edited before saving.      |

Do not treat recorder output as final without review. It is a starting point.

## Start Recording

1. Open the **Test Suite**.
2. Select or create the feature you want to author.
3. Open the feature editor and choose **Record**.
4. If the feature already has content, TestVibe asks you to confirm recording over it first. A blank feature skips this.
5. Pick **which environment** to record against. Before launching, TestVibe checks that a cloud browser can reach that site — if it can't (a private, VPN-only, or `localhost` URL with no tunnel), it offers **Connect a tunnel** or **Record anyway** rather than launching a recording that couldn't be validated. See [Environment availability](/workspace/configure-site-url-and-repository.md#environment-availability).
6. Install the TestVibe Recorder extension if prompted. The launch page then opens showing the chosen site read-only, with a single **Begin recording** button — click it to start.
7. Interact with the target site — click, type, and navigate as a user would. Each action streams live into the drawer's timeline back in TestVibe.
8. Choose **Finish** in TestVibe to turn the steps into a reviewable Gherkin scenario.

TestVibe updates the timeline live while recorder events are received. Full-page and cross-origin navigation during recording is captured, not lost — the navigation itself becomes a step, and recording keeps going after the page changes.

If a recording finishes with no actionable steps (only scrolling or navigating, no clicks or typed input), TestVibe says so honestly and offers **Discard** or **Record again** — it never presents an empty result as something to save.

## Review The Output

Before saving, check that the Gherkin:

| Review         | What to look for                                                         |
| -------------- | ------------------------------------------------------------------------ |
| Feature name   | It should describe the user journey, not the recording session.          |
| Scenario focus | It should cover one behavior, not every action you tried.                |
| Step wording   | Steps should be readable and user-facing.                                |
| Assertions     | The scenario should include clear `Then` outcomes.                       |
| Sensitive data | Passwords, tokens, and private values should not be saved in plain text. |

Edit the preview before saving when the wording needs cleanup.

### Credentials Are Tokenized

When you type into a password or a username/email field during a login recording, TestVibe does not save the value. The password becomes a `{{secret:PASSWORD}}` token and the username becomes a `{{var:USERNAME}}` token; the actual values are stored as the project's secret and variable and are never shown in the Gherkin, the generated code, or the saved recording. The review drawer confirms which credentials were captured, by name only. See [Add API keys and secrets](/workspace/add-api-keys-and-secrets.md).

## Save And Validate

When you finish, the review drawer offers two actions:

| Action          | What it does                                                                                                                                                                                            |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Save & Validate | Saves the reviewed Gherkin as the feature, then regenerates the Playwright code through the standard generation engine — so the saved test is authored and verified the same way any generated test is. |
| Discard         | Throws the recording away. It confirms first if you have unsaved steps.                                                                                                                                 |

There is no separate **Verify** step and no cold replay of the recorded selectors — **Save & Validate always regenerates**. The recorded journey becomes the input to a normal generation, which you can watch in the generation drawer (the feature's button reads **Fixing…** while it runs). Closing the drawer during review discards the recording; your steps are only kept once you choose **Save & Validate**.

## Recording Tips

* Start from a stable page.
* Use a test account, not a personal account.
* Pause and plan the journey before clicking.
* Avoid exploratory clicks that do not belong in the final test.
* Add or improve final assertions after recording.
* Remove any accidental sensitive text before saving.

## After Validation

Once **Save & Validate** finishes:

1. Review the generated Playwright code and the generation output.
2. Run the test.
3. Use results to refine the feature.

If the generated test does too much, split the recorded journey into smaller scenarios and record them separately.

## Related Pages

* [Write good test instructions](/create-tests/write-good-test-instructions.md)
* [Gherkin and feature files](/create-tests/gherkin-and-feature-files.md)
* [Generate Playwright code](/ai-generation/generate-playwright-code.md)


---

# 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.testvibe.com/create-tests/use-recorder.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.
