Skip to content

page-as-data

Options

Option Command What it does
--width 390 read Viewport width. Default 1440. Below 768 it emulates a phone with touch.
--widths 390,1440 check Widths to check. Default 390,1440.
--click "Name" read Click a control by its name. Repeatable.
--fill "Label=value" read Fill a field by its label. Repeatable. Works with React-controlled inputs.
--inspect "text or selector" read Box, visibility, colours and contrast of an element. Repeatable.
--screenshot file.png read Also save a screenshot.
--strict check Exit 1 on warnings too.
--port 9222 both Attach to a Chrome started with --remote-debugging-port.
--launch both Start a headless Chrome instead.
--json both Machine-readable output.
--timeout 15000 both How long to wait for a page to settle, in ms.

Exit codes: 0 nothing found, 1 problems found, 2 could not run (no Chrome, bad URL, a step could not find its control).