> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/guides-and-quickstarts/using-tools-and-actions/browser-recording-and-replay.md).

# Browser recording and replay

**Browser Navigation** lets a workflow perform a browser task from written instructions. A saved browser session provides the browser context for that task, such as the open site and its sign-in state.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FdtLODpWFddoBQkVLFfmE%2FG052.mp4?alt=media&token=190bbe3a-7b71-4457-ba18-407ca516ebbb>" %}

## Before you start

Open an editable workflow and identify the website, starting page, account access, and permitted operations for the browser task. Use a task whose result you can check on the destination page.

To replay a fixed sequence of recorded clicks instead of giving written navigation instructions, use [Record and replay browser navigation](https://docs.stackai.com/guides-and-quickstarts/using-tools-and-actions/record-and-replay-browser-navigation.md). The two actions have different setup and run behavior.

## Add Browser Navigation

Add Browser Navigation and describe the task to perform in the browser.

![Browser Navigation action setup](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/JdH6PePPkKrzH9V5Wj2F/assets/g052-g052-01-task.png)

Make the intended site, required information, and permitted actions clear.

## Create a browser session

Under Session, select Create new session and enter a descriptive name.

![Browser session creation controls](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/gGu39TQAEOpF3Mi9LFfa/assets/g052-g052-02-session.png)

The interactive browser opens in a sandbox for the session setup.

Navigate the required site in the sandbox and complete the session setup.

![Browser session creation controls](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/DFWJQkgwM69aPbsUf00P/assets/g052-g052-03-navigate.png)

Check that the browser reaches the state the navigation task needs.

## Save the session

Save the browser session and return to the action.

![Saved browser session selection](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/h2qIsH3bOaakQX1hwM8m/assets/g052-g052-04-select.png)

Confirm that the saved session is selected in the Session field.

## Run the navigation task

Run the action and inspect its result and session details.

![Browser navigation execution results](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/8S8R8nBk9aLYEBG1O2e9/assets/g052-g052-05-result.png)

Check success, errors, and whether the session was saved or restored as expected.

## Important behavior

A saved session supplies the browser state used by the navigation action. Check session and error details if a run does not reach the expected page.

## Continue

* [Record and replay browser navigation](https://docs.stackai.com/guides-and-quickstarts/using-tools-and-actions/record-and-replay-browser-navigation.md)
* [Workflow debugging and node results](https://docs.stackai.com/guides-and-quickstarts/workflow-builder/workflow-debugging-and-node-results.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 by asking a question.

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

```
GET https://docs.stackai.com/guides-and-quickstarts/using-tools-and-actions/browser-recording-and-replay.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.
