# browser.page.run

Runs a Playwright script in a remote headless browser — screenshots, PDFs, scraping

# browser.page.run

```
browser.page.run --credential TEXT → page
```

Runs a Playwright script in a remote headless browser — screenshots, PDFs, scraping. The browser is reached through a `browser_*` credential (a Browserless-compatible endpoint the owner configured) — screenshots, PDF of a live page, scraping a page that needs JavaScript. The body after `--` is the script, an ESM `export default async ({ page, context }) => { … }`; read upstream payload values from `context.input` (and trigger data from `context.trigger`) rather than interpolating strings into JS source. Whatever it returns is added to the payload as `page`, and the rest is kept. The engine's `--timeout` bounds the run (e.g. `--timeout 2m`). This is not for verifying your own pages during development — that is the agent's own browser (`zebflow-verify`).

## Flags

- `--credential` (required): The browser connection's credential (kind browser_*).

## Examples

### Title of a rendered page

```
| browser.page.run --credential browserless_main --timeout 20s -- "export default async ({ page, context }) => { await page.goto(context.input.url); return { title: await page.title() }; }"
```

Read it downstream as `input.page.title`.

It answers:

```json
{
  "page": {
    "title": "Example Domain"
  }
}
```
