# olef web

Source: https://olef.dev/docs/reference/cli/web

Generated from **Olef 3.18.0**. [All olef commands](https://olef.dev/docs/reference/commands) · [ocloud commands](https://olef.dev/docs/reference/ocloud) · [Capabilities](https://olef.dev/docs/reference/capabilities)

These entries describe available commands, not a sequence to run. Check prerequisites before changing app, device, or cloud state. Global options are listed in the [command catalog](https://olef.dev/docs/reference/commands#global-options).

## olef web

Inspect and drive debuggable Android WebViews via pure-Rust Chrome DevTools Protocol

```bash
olef web --help
```

Output: **json**.

### olef web targets

Discover debuggable WebView DevTools targets for `--app` (browser sockets excluded by default)

```bash
olef web targets --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--app <APP>` | App package or configured app alias |
| `--include-browsers` | Explicitly allow inspecting browser DevTools sockets (`@chrome_devtools_remote`, Custom Tabs) |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef web dump

Dump interactive DOM & accessibility elements inside a WebView (piercing shadow DOM & same-origin iframes)

```bash
olef web dump --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--app <APP>` | App package or configured app alias |
| `--page <PAGE>` | Target page id from `olef web targets` (defaults to the first visible page) |
| `--full` | Include non-interactive elements and full attributes |
| `--include-browsers` | Explicitly allow inspecting browser sockets |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef web find

Find elements in a WebView matching a selector without acting on them

```bash
olef web find --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--app <APP>` | App package or configured app alias |
| `--page <PAGE>` | Target page id from `olef web targets` |
| `--css <CSS>` | CSS selector (pierces open shadow roots and same-origin iframes) |
| `--text <TEXT>` | Visible text match (substring by default; add `--exact` for exact match) |
| `--role <ROLE>` | ARIA role or tag role (e.g. `button`, `textbox`, `link`) |
| `--testid <TESTID>` | Match `[data-testid="..."]` |
| `--xpath <XPATH>` | XPath selector evaluated across document, shadow roots, and same-origin iframes |
| `--exact` | Require exact text match instead of substring match |
| `--include-browsers` |  |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef web tap

Click/tap a unique WebView element (with shadow DOM, iframe, and optional native-overlay occlusion checks)

```bash
olef web tap --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--app <APP>` | App package or configured app alias |
| `--page <PAGE>` | Target page id from `olef web targets` |
| `--css <CSS>` | CSS selector (pierces open shadow roots and same-origin iframes) |
| `--text <TEXT>` | Visible text match (substring by default; add `--exact` for exact match) |
| `--role <ROLE>` | ARIA role or tag role (e.g. `button`, `textbox`, `link`) |
| `--testid <TESTID>` | Match `[data-testid="..."]` |
| `--xpath <XPATH>` | XPath selector evaluated across document, shadow roots, and same-origin iframes |
| `--exact` | Require exact text match instead of substring match |
| `--wait-ms <WAIT_MS>` | Wait up to this many milliseconds for the element to appear before clicking Default: `3000`. |
| `--allow-occluded` | Allow clicking even when an occlusion/overlay is detected |
| `--include-browsers` |  |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef web text

Type text into a WebView input/textarea/contenteditable element and verify readback

```bash
olef web text --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<value>` | Text to enter (use `--value-env` for secrets) |
| `--value-env <ENV>` | Read value from an environment variable without echoing it in output Conflicts with: `value`. |
| `--app <APP>` | App package or configured app alias |
| `--page <PAGE>` | Target page id from `olef web targets` |
| `--css <CSS>` | CSS selector (pierces open shadow roots and same-origin iframes) |
| `--text <TEXT>` | Visible text match (substring by default; add `--exact` for exact match) |
| `--role <ROLE>` | ARIA role or tag role (e.g. `button`, `textbox`, `link`) |
| `--testid <TESTID>` | Match `[data-testid="..."]` |
| `--xpath <XPATH>` | XPath selector evaluated across document, shadow roots, and same-origin iframes |
| `--exact` | Require exact text match instead of substring match |
| `--clear` | Clear existing value before typing |
| `--submit` | Dispatch Enter / form submit after typing |
| `--include-browsers` |  |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef web wait

Wait until a WebView selector appears (or disappears with `--gone`)

```bash
olef web wait --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--app <APP>` | App package or configured app alias |
| `--page <PAGE>` | Target page id from `olef web targets` |
| `--css <CSS>` | CSS selector (pierces open shadow roots and same-origin iframes) |
| `--text <TEXT>` | Visible text match (substring by default; add `--exact` for exact match) |
| `--role <ROLE>` | ARIA role or tag role (e.g. `button`, `textbox`, `link`) |
| `--testid <TESTID>` | Match `[data-testid="..."]` |
| `--xpath <XPATH>` | XPath selector evaluated across document, shadow roots, and same-origin iframes |
| `--exact` | Require exact text match instead of substring match |
| `--gone` | Wait for the element to disappear instead of appear |
| `--timeout-ms <TIMEOUT_MS>` | Timeout in milliseconds Default: `10000`. |
| `--include-browsers` |  |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef web eval

Evaluate a JavaScript expression inside the WebView page context

```bash
olef web eval --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<expression>` | **Required.** JavaScript expression to evaluate |
| `--app <APP>` | App package or configured app alias |
| `--page <PAGE>` | Target page id from `olef web targets` |
| `--await` | Await returned Promises |
| `--timeout-ms <TIMEOUT_MS>` | Timeout in milliseconds Default: `10000`. |
| `--include-browsers` |  |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef web console

Read active DevTools console logs and uncaught JS exceptions from the WebView page

```bash
olef web console --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--app <APP>` | App package or configured app alias |
| `--page <PAGE>` | Target page id from `olef web targets` |
| `--level <LEVEL>` | Minimum severity level to include Default: `all`. Values: `error`, `warning`, `all`. |
| `--last <LAST>` | Maximum entries to return Default: `50`. |
| `--listen-ms <LISTEN_MS>` | Milliseconds to listen for buffered/live console events after enabling CDP Log/Runtime Default: `400`. |
| `--include-browsers` |  |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef web cookies

Inspect cookies visible to the WebView page (values masked unless `--values` and not `--redact`)

```bash
olef web cookies --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--app <APP>` | App package or configured app alias |
| `--page <PAGE>` | Target page id from `olef web targets` |
| `--domain <DOMAIN>` | Filter cookies by domain substring |
| `--values` | Include raw cookie values (always masked when global `--redact` is active) |
| `--include-browsers` |  |
| `--json` | Accepted for compatibility; output is always JSON. |
