Skip to main content

Contexts

Persist cookies, authentication state, and application data across sessions — no need to log in on every run.

Viewports

Configure the screen size and resolution of your browser sessions to match any device or layout requirement.

Session metadata

Tag sessions with custom key-value data to organize, filter, and query your automation runs.

Browser Extensions

Load your own Chrome extensions into sessions to augment browser behavior or bypass site-specific challenges.

Quick reference

FeatureWhat it doesWhen to use it
ContextsPersists cookies, auth tokens, and browser storage across sessionsAny workflow that requires login — avoids re-authenticating on every run
ViewportsSets the browser window width and heightVisual testing, screenshots, or layouts that are viewport-dependent
Session metadataAttaches custom JSON to a session for querying laterOrganizing sessions by test run, environment, team, or status
Browser extensionsLoads a Chrome extension into the sessionCustom page behavior, ad blocking, or site-specific workarounds

All features are set at session creation

Every core feature is configured when you create a session. Pass your settings in the browserSettings object:
const session = await bb.sessions.create({
  browserSettings: {
    viewport: { width: 1920, height: 1080 },
    solveCaptchas: true,
  },
  context: { id: contextId, persist: true },
});
See the Create Session API reference for the full list of options.