Skip to main content
Navigation commands control where the browser goes and how long it waits to get there. Every command in this group operates on the active tab of the current session; use the --session global flag when you need to target a named parallel instance. Before using any element-based command after navigation, run gsd-browser snapshot to capture fresh, versioned refs for the new page state.

Global Flags

These flags are accepted by every gsd-browser command, not just navigation commands.
flag
Emit machine-readable JSON on stdout instead of human-readable text. Errors are also written as JSON to stderr.
string
Target a named daemon session. Use this when you have multiple parallel browser instances running side-by-side.
string
Path to a custom Chrome or Chromium binary. Overrides the value set in your config file.
string
Connect to an already-running Chrome instance via a Chrome DevTools Protocol (CDP) endpoint (e.g. ws://localhost:9222). Accepts both ws:// and http:// endpoints.
flag
Skip the lead-time sleeps that gsd-browser inserts between narrated actions. Useful in CI where speed matters more than realistic pacing.

gsd-browser navigate

Navigate the active tab to a URL. The command waits for the page to load before returning. Combine with a subsequent gsd-browser wait-for call when you need finer control over the ready condition.
string
required
The fully-qualified URL to navigate to (e.g. https://example.com/login).
Examples

gsd-browser back

Go back one step in the active tab’s navigation history — the browser equivalent of clicking the Back button.
Example

gsd-browser forward

Go forward one step in the active tab’s navigation history — the browser equivalent of clicking the Forward button.
Example

gsd-browser reload

Reload the current page.
Example

gsd-browser wait-for

Block until a specified page condition becomes true. Use wait-for after actions that trigger asynchronous changes — navigation, form submission, AJAX calls, or animations — before your next interaction step.
string
required
The condition to wait for. Supported values:
string
Condition-specific value: a CSS selector, URL substring, text string, or delay in milliseconds depending on the chosen --condition.
number
Maximum time to wait in milliseconds before the command fails. Defaults to 10000 (10 seconds).
string
Comparison expression for element_count, e.g. >=3, ==0, <5.
Examples