Setup
bl count
Count matching elements
Count matching elements
Usage
bl count <selector> [OPTIONS]Arguments
| Argument | Description |
|---|---|
<selector> | CSS selector to count matches for |
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 count "a"
# Print number of links on the page
bl count "li.item"
# Count list items