> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.doc-detective.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.doc-detective.com/_mcp/server.

# Browser surface

> Reference for the `Browser surface` schema.

## Referenced In

* [Click element (detailed)](/reference/schemas/click-element-detailed)
* [Find element (detailed)](/reference/schemas/find-element-detailed)
* [Type keys (detailed)](/reference/schemas/type-keys-detailed)
* [Go to URL (detailed)](/reference/schemas/go-to-url-detailed)
* [Run browser script (detailed)](/reference/schemas/run-browser-script-detailed)
* [Capture screenshot (detailed)](/reference/schemas/capture-screenshot-detailed)
* [Capture screenshot fields](/reference/schemas/capture-screenshot-fields)
* [Record (detailed)](/reference/schemas/record-detailed)
* [closeSurface](/reference/schemas/closesurface)
* [dragAndDrop](/reference/schemas/draganddrop)
* [Swipe (directional)](/reference/schemas/swipe-directional)
* [Swipe (point-to-point)](/reference/schemas/swipe-point-to-point)

## Fields

| Field   | Type                                                                               | Description                                                                                                                                                                                                                                                                                                                 | Default |
| :------ | :--------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
| browser | string                                                                             | Required. Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open. Accepted values: `chrome`, `firefox`, `safari`, `webkit`, `edge` | —       |
| name    | string                                                                             | Optional. Name of the browser surface. Defaults to the engine name (the context's default browser registers under its engine). Assign distinct names to drive multiple browsers at once, including several of the same engine. Minimum length: 1. Pattern: `\S`                                                             | —       |
| window  | one of: - integer - string - object([By criteria](/reference/schemas/by-criteria)) | Optional. Which window to act on. Omit to use the active window.                                                                                                                                                                                                                                                            | —       |
| tab     | one of: - integer - string - object([By criteria](/reference/schemas/by-criteria)) | Optional. Which tab to act on. Omit to use the active tab. Without `window`, the selector searches every tab in creation order — including tabs the page opened itself.                                                                                                                                                     | —       |

## Examples

```json
{
  "browser": "chrome",
  "name": "example",
  "window": 42,
  "tab": 42
}
```