hubcap goto
Navigate the browser to a URL.
When to use
Use goto to navigate to a URL in the current tab. Add --wait to block until the page is fully loaded. Use reload to reload the current page instead, or back/forward for history navigation.
Usage
hubcap goto [--wait] <url> Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The URL to navigate to. If no scheme is provided, https:// is prepended automatically. |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
| —wait | bool | false | Wait for page load to complete |
Output
Without --wait:
| Field | Type | Description |
|---|---|---|
| frameId | string | Frame identifier |
| loaderId | string | Loader identifier |
| url | string | The URL navigated to |
{"frameId":"ABC123","loaderId":"DEF456","url":"https://example.com"} With --wait:
| Field | Type | Description |
|---|---|---|
| url | string | The URL navigated to |
| frameId | string | Frame identifier |
| loaderId | string | Loader identifier |
| loaded | bool | Whether the page loaded |
{"url":"https://example.com","frameId":"ABC123","loaderId":"DEF456","loaded":true} Errors
| Condition | Exit code | Stderr |
|---|---|---|
| Chrome not connected | 2 | error: connecting to Chrome: ... |
| Timeout | 3 | error: timeout |
Examples
Navigate to a URL:
hubcap goto example.com Navigate with an explicit scheme:
hubcap goto https://example.com Navigate and wait for load:
hubcap goto --wait example.com Navigate, wait, then take a screenshot (chaining):
hubcap goto --wait https://example.com && hubcap screenshot --output page.png Navigate and extract the page title:
hubcap goto --wait https://example.com && hubcap title