Elements
bl scroll
Scroll the page or an element
Scroll the page or an element
Usage
bl scroll [direction] [OPTIONS]
bl scroll <command>Arguments
| Argument | Description |
|---|---|
[direction] | Scroll direction: up or down (default down) |
Options
| Option | Description |
|---|---|
--amount <value> | Number of scroll increments (default 3) |
--selector <value> | CSS selector for element to scroll to |
--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 scroll
# Scroll down by default
bl scroll up
# Scroll up
bl scroll down --amount 5
# Scroll down 5 increments
bl scroll down --selector "div.content"
# Scroll within a specific elementbl scroll into-view
Scroll an element into view
Usage
bl scroll into-view <selector> [OPTIONS]Arguments
| Argument | Description |
|---|---|
<selector> | CSS selector (or map ref) for the element to scroll into view |
Options
| Option | Description |
|---|---|
--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 scroll into-view "#footer"
# Scroll the footer element into view (centered on screen)