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

# devtools_recorder

> Record and replay browser actions.

Record and replay browser actions. start records every browser\_navigate/click/fill/select/key/wait on the tab (with a stable selector per element); stop saves the flow as a JSON artifact. add\_assertion appends a browser\_wait check; add\_checkpoint marks a place replay can stop at; parameterize turns a recorded literal into \{\{name}}. replay runs a flow on a tab with params, resolving selectors to fresh refs, and stops at the first failure or at stopAtCheckpoint.

## Parameters

<ParamField body="action" type="enum" required>
  One of: `start`, `stop`, `status`, `list`, `get`, `add_assertion`, `add_checkpoint`, `parameterize`, `replay`, `delete_step`, `export`.
</ParamField>

<ParamField body="format" type="enum">
  export: target format (Playwright TypeScript test) One of: `playwright`.
</ParamField>

<ParamField body="path" type="string">
  export: also write the file here
</ParamField>

<ParamField body="tabId" type="integer">
  Target tab id from browser\_tabs, which lists tabs across all windows. Defaults to the agent's most recently opened usable tab, or the only usable tab. Otherwise select a listed tabId.
</ParamField>

<ParamField body="name" type="string">
   
</ParamField>

<ParamField body="flowId" type="string">
  Flow id or artifact path
</ParamField>

<ParamField body="assertion" type="object">
   
</ParamField>

<ParamField body="label" type="string">
  Checkpoint label
</ParamField>

<ParamField body="stepIndex" type="integer">
   
</ParamField>

<ParamField body="field" type="string">
  Arg to parameterize, e.g. "text" or "url"
</ParamField>

<ParamField body="paramName" type="string">
   
</ParamField>

<ParamField body="params" type="object">
   
</ParamField>

<ParamField body="stopAtCheckpoint" type="string">
   
</ParamField>

<ParamField body="fromStep" type="integer">
   
</ParamField>

<ParamField body="continueOnFailure" type="boolean">
   
</ParamField>

## Example

```json theme={null}
{
  "action": "start",
  "tabId": 1234,
  "name": "checkout"
}
```

```json Add an assertion while recording theme={null}
{
  "action": "add_assertion",
  "flowId": "checkout",
  "assertion": {
    "text": "Order confirmed"
  }
}
```

```json theme={null}
{
  "action": "stop",
  "flowId": "checkout"
}
```

```json Turn a literal into a parameter theme={null}
{
  "action": "parameterize",
  "flowId": "checkout",
  "stepIndex": 2,
  "field": "text",
  "paramName": "email"
}
```

```json Replay with parameters theme={null}
{
  "action": "replay",
  "flowId": "checkout",
  "tabId": 1234,
  "params": {
    "email": "qa@example.com"
  }
}
```

```json Export as a Playwright test theme={null}
{
  "action": "export",
  "flowId": "checkout",
  "format": "playwright",
  "path": "/Users/me/tests/checkout.spec.ts"
}
```
