Elements
bl fill
Clear an input field and type new text
Clear an input field and type new text
Usage
bl fill <selector> <text> [OPTIONS]Arguments
| Argument | Description |
|---|---|
<selector> | CSS selector or @ref of the input field |
<text> | Text to type into the field after clearing it |
Options
| Option | Description |
|---|---|
--nth <value> | Select the 0-based Nth match of the selector (default: first). Mutually exclusive with --last. |
--last | Select the last match of the selector. Mutually exclusive with --nth. |
--headless | Hide browser window (visible by default) |
--json | Output as JSON |
--session <value> | Run this command in the named session (env: BL_SESSION; default: "default") |
Global options
| Option | Description |
|---|---|
-v, --verbose | Enable debug logging |
Examples
bl fill "input[name=email]" "user@example.com"
# Clear the field and type new value
bl fill "#search" "browserlane"
# Replace search field contents
bl fill ".field" "x" --nth 1
# Fill the second matching field (0-based)