Elements

bl focus

Focus an element

Focus an element

Usage

bl focus <selector> [OPTIONS]

Arguments

ArgumentDescription
&lt;selector&gt;CSS selector (or map ref) for the element to focus

Options

OptionDescription
--nth <value>Select the 0-based Nth match of the selector (default: first). Mutually exclusive with --last.
--lastSelect the last match of the selector. Mutually exclusive with --nth.
--headlessHide browser window (visible by default)
--jsonOutput as JSON
--session <value>Run this command in the named session (env: BL_SESSION; default: "default")

Global options

OptionDescription
-v, --verboseEnable debug logging

Examples

bl focus "input[name=email]"
# Focus the email input

bl focus ".field" --nth 2
# Focus the third matching field (0-based)

bl focus @e1
# Focus element from map

On this page