Saltar al contenido principal

Function: createBrowserManager()

function createBrowserManager(
config,
launch?,
install?,
windowsPossible?
): BrowserManager;

Defined in: browser/manager.ts:97

A browser manager that launches the browser itself, in the persistent profile of config (ADR-002), on first use: nothing opens until a function needs the browser. It tries the installed browsers and, if allowed, downloads Chromium in the background (ADR-001). Its context() throws BrowserNotFoundError when no browser can be launched, BrowserDownloadingError while Chromium downloads, and NoDisplayError for a window without a screen. The other parameters are for tests.

Parameters​

ParameterTypeDefault value
configBrowserOptionsundefined
launch(userDataDir, options?) => Promise<BrowserContext>...
installInstallChromiuminstallChromium
windowsPossible() => booleancanShowWindow

Returns​

BrowserManager