Skip to content

Interaction

Click an element.

brow click -s <id> [<selector>] [--ref <n>] [--timeout <ms>] [--retry <n>] [--no-wait]
Argument/Flag Default Description
<selector> Playwright selector (CSS, text=, role=)
--ref Element ref number from snapshot
--timeout 30000 Timeout in milliseconds
--retry 0 Retry attempts (1-second delay each)
--no-wait false Skip waiting for element to be visible
Terminal window
brow click -s 1 "text=Sign In"
brow click -s 1 "button[type=submit]"
brow click -s 1 --ref 5 # use ref from snapshot

After clicking, the command returns the updated snapshot.

Repeat a click until a selector clears (or work runs out) — “load more” pagination, batch-dismiss actions, draining a queue. One call instead of a shell loop guessing when to stop.

brow click-until -s <id> <selector> [--until-gone <selector>] [--max-iterations <n>]
Argument/Flag Default Description
<selector> Element to click repeatedly
--until-gone Stop once this selector has no matches left
--max-iterations 25 Safety cap on clicks
Terminal window
brow click-until -s 1 "button.load-more" --until-gone "button.load-more"
# Clicked 4 time(s)

Always check why it stopped — hitting the cap looks identical to “nothing left to click” unless you read the reason, which goes to stderr:

Terminal window
brow click-until -s 1 "button.next" --until-gone ".row" --max-iterations 3
# stderr: hit max_iterations (3) — work may remain, re-run to continue

Fill an input field with a value.

brow fill -s <id> [<selector>] <value> [--ref <n>] [--timeout <ms>] [--retry <n>] [--no-wait]
Terminal window
brow fill -s 1 "#email" "user@example.com"
brow fill -s 1 --ref 3 "search query" # fill by ref

If only one argument is passed, it’s treated as the value (use --ref to identify the field).

Select an option in a <select> element.

brow select -s <id> [<selector>] <value> [--ref <n>] [--timeout <ms>]
Terminal window
brow select -s 1 "#country" "Slovakia"
brow select -s 1 --ref 8 "en"

The <value> matches the option’s value attribute or visible text.

Type text at the current cursor position (keyboard simulation).

brow type -s <id> <text>
Terminal window
brow type -s 1 "Hello, world"

Unlike fill, type dispatches real keyboard events — use it when a form field requires keystroke events (e.g. autocomplete inputs).

Press a keyboard key or key combination.

brow key -s <id> <key>

Common keys: Enter, Tab, Escape, Space, PageDown, PageUp, End, Home, ArrowUp, ArrowDown.

Key combos use +: Meta+a, Control+c, Shift+Enter.

Terminal window
brow key -s 1 Enter
brow key -s 1 Tab
brow key -s 1 Meta+a

Hover over an element (triggers :hover CSS and mouseover events).

brow hover -s <id> <selector> [--timeout <ms>]
Terminal window
brow hover -s 1 "nav .dropdown"

Scroll the page by a number of pixels.

brow scroll -s <id> <pixels>
Terminal window
brow scroll -s 1 1000 # scroll down 1000px
brow scroll -s 1 -500 # scroll up 500px

!!! note “Scroll limitations” scroll only works on the outermost page. It has no effect inside iframes or fixed-height containers. For those, use keyboard navigation:

```bash
brow click -s 1 "text=Section" # focus the container
brow key -s 1 PageDown # scroll down
brow key -s 1 End # jump to bottom
```

Scroll an element into view.

brow scroll-to -s <id> <selector>
Terminal window
brow scroll-to -s 1 "#footer"

Drag from one element to another.

brow drag -s <id> <source-selector> <target-selector>
Terminal window
brow drag -s 1 ".task-card" ".done-column"

Upload a file via a file input element.

brow upload -s <id> <selector> <filepath>
Terminal window
brow upload -s 1 "input[type='file']" "/path/to/document.pdf"

!!! warning “Use CSS selectors” Numeric snapshot refs ([3]) return a 500 error for upload. Always use a CSS selector like input[type='file'].