Browser state & emulation

bl emulate

Emulate the browsing environment (locale, timezone, user agent, network, scripting)

Emulate the browsing environment (locale, timezone, user agent, network, scripting)

Usage

bl emulate [OPTIONS]
bl emulate <command>

Options

OptionDescription
--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

bl emulate environment

Set session-scoped environment overrides (persist until reset)

Usage

bl emulate environment [OPTIONS]

Options

OptionDescription
--locale <value>BCP 47 language tag, e.g. fr-CA
--timezone <value>IANA zone (Asia/Tokyo) or offset (+05:30)
--user-agent <value>User-Agent string
--offlineEmulate being offline
--no-scriptingEmulate disabled JavaScript for page content
--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 emulate environment --locale fr-CA
# Browse as a French-Canadian locale

bl emulate environment --timezone Asia/Tokyo --locale ja-JP
# Combine environment overrides

bl emulate environment --offline
# Take the session offline

bl emulate reset

Reset environment overrides to the browser defaults

Usage

bl emulate reset <target> [OPTIONS]

Arguments

ArgumentDescription
&lt;target&gt;Which override to reset ('environment' resets all five)

Options

OptionDescription
--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 emulate reset locale
# Restore the real locale

bl emulate reset environment
# Restore everything

On this page