> 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.

# loadState

> Reference for the `loadState` schema.

## Referenced In

* [test](/reference/schemas/test)
* [Resolved context](/reference/schemas/resolved-context)

## Fields

| Field     | Type                                                                                       | Description                                                                                                                                                 | Default |
| :-------- | :----------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
| loadState | one of: - string - object([Load state (detailed)](/reference/schemas/load-state-detailed)) | Required. Load the cookies and `localStorage` saved by `saveState`, or by Playwright's `storageState`, into the open site. Open the site with `goTo` first. | —       |

## Examples

```json
{
  "loadState": "auth.json"
}
```

```json
{
  "loadState": {
    "path": "auth.json",
    "directory": "../.auth"
  }
}
```