Configuration

Module settings, environment variables and resolution order.

On this page

Configuration

Override any setting in boxlang.json:

{
	"modules": {
		"playwright": {
			"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 }, see Testing
snapshots{ threshold : 0.2 }Visual regression, see Quality Checks. A relative directory 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

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

Resolution order

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

playwright( "mobile", { locale : "es-ES" } )
pw.newPage( { colorScheme : "dark", timeouts : { assertion : 10000 } } )
Edit this page Download Markdown Last updated Sep 30, 2026, 7:24:11 PM