Skip to main content
Version: Next

RemotePlaywrightPlugin

A PlaywrightPlugin that connects to a remote browser service (Browserbase, Browserless, Steel, …) instead of launching locally. launchOptions are ignored — the remote service owns the browser.

Remote connections only support incognito pages (connect() / connectOverCDP() don't accept persistent contexts), so useIncognitoPages is always true.

Hierarchy

Index

Constructors

constructor

Properties

optionalreadonlyinheritedbrowserPerProxy

browserPerProxy?: boolean

optionalreadonlyinheritedignoreProxyCertificate

ignoreProxyCertificate?: boolean

readonlyinheritedlaunchOptions

launchOptions: undefined | LaunchOptions

readonlyinheritedlibrary

library: BrowserType<{}>

readonlyinheritedname

name: string = ...

optionalreadonlyinheritedproxyUrl

proxyUrl?: string

inheriteduseIncognitoPages

useIncognitoPages: boolean

optionalreadonlyinheriteduserDataDir

userDataDir?: string

Methods

inheritedcreateController

createLaunchContext

  • createLaunchContext(options): LaunchContext<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; clientCertificates?: { cert?: Buffer<ArrayBufferLike>; certPath?: string; key?: Buffer<ArrayBufferLike>; keyPath?: string; origin: string; passphrase?: string; pfx?: Buffer<ArrayBufferLike>; pfxPath?: string }[]; colorScheme?: null | light | dark | no-preference; contrast?: null | no-preference | more; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; send?: unauthorized | always; username: string } | { origin?: string; password: string; send?: unauthorized | always; username: string }[]; ignoreHTTPSErrors?: boolean; isMobile?: boolean; javaScriptEnabled?: boolean; locale?: string; logger?: Logger; offline?: boolean; permissions?: string[]; proxy?: { bypass?: string; password?: string; server: string; username?: string }; recordHar?: { content?: omit | embed | attach; mode?: full | minimal; omitContent?: boolean; path: string; urlFilter?: string | RegExp }; recordVideo?: { dir?: string; fps?: number; showActions?: { cursor?: none | pointer; duration?: number; fontSize?: number; position?: top-left | top | top-right | bottom-left | bottom | bottom-right; style?: { highlight?: string; point?: string; title?: string } }; size?: { height: number; width: number } }; reducedMotion?: null | reduce | no-preference; screen?: { height: number; width: number }; serviceWorkers?: allow | block; storageState?: string | { cookies: { domain: string; expires: number; httpOnly: boolean; name: string; path: string; sameSite: Strict | Lax | None; secure: boolean; value: string }[]; origins: { localStorage: { name: string; value: string }[]; origin: string }[] }; strictSelectors?: boolean; timezoneId?: string; userAgent?: string; viewport?: null | { height: number; width: number } }, Page>
  • Creates a LaunchContext with all the information needed to launch a browser. Aside from library specific launch options, it also includes internal properties used by BrowserPool for management of the pool and extra features.


    Parameters

    • options: CreateLaunchContextOptions<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; clientCertificates?: { cert?: Buffer<ArrayBufferLike>; certPath?: string; key?: Buffer<ArrayBufferLike>; keyPath?: string; origin: string; passphrase?: string; pfx?: Buffer<ArrayBufferLike>; pfxPath?: string }[]; colorScheme?: null | light | dark | no-preference; contrast?: null | no-preference | more; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; send?: unauthorized | always; username: string } | { origin?: string; password: string; send?: unauthorized | always; username: string }[]; ignoreHTTPSErrors?: boolean; isMobile?: boolean; javaScriptEnabled?: boolean; locale?: string; logger?: Logger; offline?: boolean; permissions?: string[]; proxy?: { bypass?: string; password?: string; server: string; username?: string }; recordHar?: { content?: omit | embed | attach; mode?: full | minimal; omitContent?: boolean; path: string; urlFilter?: string | RegExp }; recordVideo?: { dir?: string; fps?: number; showActions?: { cursor?: none | pointer; duration?: number; fontSize?: number; position?: top-left | top | top-right | bottom-left | bottom | bottom-right; style?: { highlight?: string; point?: string; title?: string } }; size?: { height: number; width: number } }; reducedMotion?: null | reduce | no-preference; screen?: { height: number; width: number }; serviceWorkers?: allow | block; storageState?: string | { cookies: { domain: string; expires: number; httpOnly: boolean; name: string; path: string; sameSite: Strict | Lax | None; secure: boolean; value: string }[]; origins: { localStorage: { name: string; value: string }[]; origin: string }[] }; strictSelectors?: boolean; timezoneId?: string; userAgent?: string; viewport?: null | { height: number; width: number } }, Page> = {}

    Returns LaunchContext<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; clientCertificates?: { cert?: Buffer<ArrayBufferLike>; certPath?: string; key?: Buffer<ArrayBufferLike>; keyPath?: string; origin: string; passphrase?: string; pfx?: Buffer<ArrayBufferLike>; pfxPath?: string }[]; colorScheme?: null | light | dark | no-preference; contrast?: null | no-preference | more; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; send?: unauthorized | always; username: string } | { origin?: string; password: string; send?: unauthorized | always; username: string }[]; ignoreHTTPSErrors?: boolean; isMobile?: boolean; javaScriptEnabled?: boolean; locale?: string; logger?: Logger; offline?: boolean; permissions?: string[]; proxy?: { bypass?: string; password?: string; server: string; username?: string }; recordHar?: { content?: omit | embed | attach; mode?: full | minimal; omitContent?: boolean; path: string; urlFilter?: string | RegExp }; recordVideo?: { dir?: string; fps?: number; showActions?: { cursor?: none | pointer; duration?: number; fontSize?: number; position?: top-left | top | top-right | bottom-left | bottom | bottom-right; style?: { highlight?: string; point?: string; title?: string } }; size?: { height: number; width: number } }; reducedMotion?: null | reduce | no-preference; screen?: { height: number; width: number }; serviceWorkers?: allow | block; storageState?: string | { cookies: { domain: string; expires: number; httpOnly: boolean; name: string; path: string; sameSite: Strict | Lax | None; secure: boolean; value: string }[]; origins: { localStorage: { name: string; value: string }[]; origin: string }[] }; strictSelectors?: boolean; timezoneId?: string; userAgent?: string; viewport?: null | { height: number; width: number } }, Page>

launch

  • launch(launchContext): Promise<Browser>
  • Skips the local proxy and webdriver-stealth preparation; the remote service owns the browser.


    Parameters

    • launchContext: LaunchContext<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; clientCertificates?: { cert?: Buffer<ArrayBufferLike>; certPath?: string; key?: Buffer<ArrayBufferLike>; keyPath?: string; origin: string; passphrase?: string; pfx?: Buffer<ArrayBufferLike>; pfxPath?: string }[]; colorScheme?: null | light | dark | no-preference; contrast?: null | no-preference | more; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; send?: unauthorized | always; username: string } | { origin?: string; password: string; send?: unauthorized | always; username: string }[]; ignoreHTTPSErrors?: boolean; isMobile?: boolean; javaScriptEnabled?: boolean; locale?: string; logger?: Logger; offline?: boolean; permissions?: string[]; proxy?: { bypass?: string; password?: string; server: string; username?: string }; recordHar?: { content?: omit | embed | attach; mode?: full | minimal; omitContent?: boolean; path: string; urlFilter?: string | RegExp }; recordVideo?: { dir?: string; fps?: number; showActions?: { cursor?: none | pointer; duration?: number; fontSize?: number; position?: top-left | top | top-right | bottom-left | bottom | bottom-right; style?: { highlight?: string; point?: string; title?: string } }; size?: { height: number; width: number } }; reducedMotion?: null | reduce | no-preference; screen?: { height: number; width: number }; serviceWorkers?: allow | block; storageState?: string | { cookies: { domain: string; expires: number; httpOnly: boolean; name: string; path: string; sameSite: Strict | Lax | None; secure: boolean; value: string }[]; origins: { localStorage: { name: string; value: string }[]; origin: string }[] }; strictSelectors?: boolean; timezoneId?: string; userAgent?: string; viewport?: null | { height: number; width: number } }, Page> = ...

    Returns Promise<Browser>