---
id: "navegador-automacao-navegacao"
titulo: "Automation: navigation and reading the page"
resumo: "Commands that open addresses, capture the page structure, wait for conditions and export content."
idioma: "en"
tipo: "referencia"
categoria: "telas"
aplicavelDesde: "0.0.16"
capabilities: ["browser.page.navigate", "browser.snapshot", "browser.screenshot", "browser.scroll", "browser.pdf", "browser.script.eval", "browser.wait"]
estadoEditorial: "aprovado"
nivelEvidencia: "artefato-distribuido"
refFonte: "27574c339b58316408f6be2d62169d59041d07bf"
revisaoFonte: "2026-09-24"
revisor: "mantenedor (v1, 2026-10-03)"
rota: "/docs/en/ferramentas/navegador/automacao-referencia-navegacao/"
fonte: "pt-br/ferramentas/navegador/automacao-referencia-navegacao.md"
caminhoPublico: "docs/publica/en/ferramentas/navegador/automacao-referencia-navegacao.md"
hashFonte: "sha256:04389174dcf0fd7420d57b83f8aa7f807d2701b7dfd389cae9274340bc16a272"
hashDestaPagina: "sha256:f218cd4c11c5e133739d3e0b036995aa455042b0bd0b3db9434dea902e0f9e96"
traducaoAssistidaPorIA: true
traducaoDesatualizada: false
corpoRetido: false
---
<!-- traducao-assistida-por-ia: idioma=EN fonte=pt-br/ferramentas/navegador/automacao-referencia-navegacao.md fonteHash=sha256:04389174dcf0fd7420d57b83f8aa7f807d2701b7dfd389cae9274340bc16a272 estado=atual -->

The commands below act on the **active browser tab**. Commands, flags and values are **literal** — they are not translated.

## How to choose the target

| Flag | Target |
|---|---|
| `--page <id>` | A specific page, by its global identifier |
| `--node <card>` | The tab referenced by a Canvas card |
| `--workspace <selector>` | The workspace |

- **`--page` and `--node` together are an error.**
- Without any of the three, the target is the **active tab of the current directory's workspace**.
- A card resolves the **card's workspace**, not the one from the directory you called from.

## Navigate

```
elyra goto --url <url> [--page <id> | --node <card>] [--workspace <selector>] [--json]
elyra back [--page <id> | --node <card>] [--workspace <selector>] [--json]
elyra forward [--page <id> | --node <card>] [--workspace <selector>] [--json]
elyra reload [--page <id> | --node <card>] [--workspace <selector>] [--json]
```

- `goto` **requires `--url`**.
- `goto` and `reload` wait for the network to go idle, with a **60 s timeout** on the call.
- The response brings the resulting **URL and title**; `back` and `forward` bring the destination URL.
- `goto` accepts any `http(s)` URL or file — it is the entry point for external content into the embedded browser.

## Read the page

```
elyra snapshot [--page <id> | --node <card>] [--workspace <selector>] [--json]
```

`snapshot` returns the active tab's **accessibility tree**. It is the source of the `ref`s used by `--element` in the interaction commands.

> **A `ref` becomes stale after navigating.** The CLI itself recommends taking a new snapshot after acting, to check what settled.

## Capture image and PDF

```
elyra screenshot [--format <png|jpeg>] [--page <id> | --node <card>] [--workspace <selector>] [--json]
elyra full-screenshot [--format <png|jpeg>] [--page <id> | --node <card>] [--workspace <selector>] [--json]
elyra pdf [--page <id> | --node <card>] [--workspace <selector>] [--json]
```

- `screenshot` captures the viewport; `full-screenshot` captures the whole page.
- `--format` accepts **`png` or `jpeg`**. Any other value is refused — including `webp`.
- `full-screenshot` normalizes any format other than `jpeg` to `png`.
- `pdf` exports the tab and **reports the size of the generated content**. Large PDFs travel as base64 in the response.

## Scroll

```
elyra scroll --direction <up|down> [--amount <pixels>] [--page <id> | --node <card>] [--workspace <selector>] [--json]
```

`--direction` is required and accepts only `up` or `down`; another value fails with an argument error. `--amount` is optional.

## Wait

```
elyra wait [--selector <sel>] [--text <text>] [--url <pattern>] [--load <state>] [--fn <js>] [--state <hidden|visible>] [--timeout <ms>] [--page <id> | --node <card>] [--workspace <selector>] [--json]
```

Accepted wait forms: element by selector, text, URL pattern, load state, JavaScript condition and visibility (`hidden` or `visible`).

- The default call timeout is **60 s**; when you pass `--timeout`, the budget becomes the given value plus 5 s.
- **A long wait without `--timeout` can blow the caller's budget.**

## Run code on the page

```
elyra eval --expression <js> [--page <id> | --node <card>] [--workspace <selector>] [--json]
elyra exec --command "<agent-browser command>" [--page <id> | --node <card>] [--workspace <selector>] [--json]
```

- `eval` requires `--expression` and returns the expression's result.
- `exec` passes a raw command to the active tab's browser and returns the raw output.
- **`exec` is not validated by the CLI beyond requiring `--command`.**

> **`eval` and `exec` run arbitrary code in the page context** — full power over the tab, including whatever is logged in on it. Use them only on pages and profiles you accept exposing, and never on a profile with a real session without need.
