Configuration

Module settings, environment variables and resolution order.

On this page

Configuration

Every setting has a sensible default. Override them in boxlang.json for the whole runtime, in a profile, with environment variables, or per call.

{
	"modules": {
		"bxplaywright": {
			"settings": {
				"baseURL": "http://localhost:8080",
				"headless": false,
				"profiles": { "staging": { "extends": "desktop", "baseURL": "https://staging.example.com" } }
			}
		}
	}
}
SettingDefaultPurpose
home~/.boxlang/playwrightDriver, Node.js, browsers, sessions, artifacts
browsersPath{home}/browsersBrowser installs
nodePath Explicit Node.js executable
nodeVersionpinned per releaseNode.js downloaded by install
nodeDownloadURLhttps://nodejs.org/distMirror for Node.js downloads
defaultProfiledefaultProfile used by playwright()
browserchromiumchromium, firefox, webkit
channel chrome, chrome-beta, msedge
headlesstrue
slowMo0Milliseconds between actions
baseURL Relative URLs resolve against it
viewport{ width : 1280, height : 720 }
device A device name, see bxplaywright devices. Its screen replaces the viewport setting and earlier viewports; a viewport set by a later profile or by options wins
locale, timezone, colorSchemecolorScheme : lightEmulation
ignoreHTTPSErrorsfalse
timeouts{ action : 30000, navigation : 30000, assertion : 5000 }Milliseconds
testIdAttributedata-testidUsed by @name and byTestId()
artifactsall off{ directory, screenshot, trace, video }. directory defaults to {home}/artifacts, see Testing
snapshots{ threshold : 0.2, maxDiffPixels : 0, maxDiffPixelRatio : 0, update : false }Visual regression, see Quality Checks. directory defaults to tests/snapshots; a relative one resolves against the current directory
render{ format : A4, printBackground : true, waitUntil : networkidle }Rendering defaults
launchOptions, contextOptions{}Any Playwright launch or context option
profiles{}Your profiles, see Profiles

Profiles and per-call options also accept session (a saved session), storageState, userAgent, deviceScaleFactor, reducedMotion, forcedColors and offline.

Environment variables

VariableEffect
BX_PLAYWRIGHT_PROFILEProfile used when none is requested
BX_PLAYWRIGHT_BROWSER, BX_PLAYWRIGHT_HEADLESS, BX_PLAYWRIGHT_BASEURLOverride those settings
BX_PLAYWRIGHT_UPDATE_SNAPSHOTStrue rewrites visual baselines
BX_PLAYWRIGHT_HOMEThe home directory
PLAYWRIGHT_NODEJS_PATHExplicit Node.js executable
PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUTBrowser-download idle timeout in milliseconds; Playwright's default is 30000. Each download is tried 5 times, so raise it only for a slow network

Resolution order

Last wins: module settings, profiles, environment variables, then the options passed to playwright(), newContext() or newPage().

pw   = playwright( "mobile", { locale : "es-ES" } )
page = pw.newPage( { colorScheme : "dark", timeouts : { assertion : 10000 } } )
Edit this page Download Markdown Last updated Oct 23, 2026, 3:55:59 PM Report an issue