Skip to main content
Version: 3.9

PlaywrightController

The BrowserController serves two purposes. First, it is the base class that specialized controllers like PuppeteerController or PlaywrightController extend. Second, it defines the public interface of the specialized classes which provide only private methods. Therefore, we do not keep documentation for the specialized classes, because it's the same for all of them.

@hideconstructor

Hierarchy

  • BrowserController<BrowserType, SafeParameters<BrowserType[launch]>[0], Browser>
    • PlaywrightController

Index

Constructors

constructor

  • new PlaywrightController(browserPlugin: BrowserPlugin<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>): PlaywrightController
  • Parameters

    • browserPlugin: BrowserPlugin<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>

    Returns PlaywrightController

Properties

activePages

activePages: number = 0

browser

browser: Browser = ...

Browser representation of the underlying automation library.

browserPlugin

browserPlugin: BrowserPlugin<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>

The BrowserPlugin instance used to launch the browser.

id

id: string = ...

isActive

isActive: boolean = false

lastPageOpenedAt

lastPageOpenedAt: number = ...

launchContext

launchContext: LaunchContext<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page> = ...

The configuration the browser was launched with.

optionalproxyTier

proxyTier?: number

The proxy tier tied to this browser controller. undefined if no tiered proxy is used.

optionalproxyUrl

proxyUrl?: string

The proxy URL used by the browser controller. This is set every time the browser controller uses proxy (even the tiered one). undefined if no proxy is used

totalPages

totalPages: number = 0

staticexternaldefaultMaxListeners

defaultMaxListeners: number

Methods

externaladdListener

  • addListener<U>(event: U, listener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]): this
  • Type parameters

    • U: BROWSER_CLOSED

    Parameters

    • externalevent: U
    • externallistener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]

    Returns this

close

  • close(): Promise<void>
  • Gracefully closes the browser and makes sure there will be no lingering browser processes.

    Emits 'browserClosed' event.


    Returns Promise<void>

externalemit

  • emit<U>(event: U, ...args: Parameters<BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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: ...; value: ... }[]; origin: string }[] }; strictSelectors?: boolean; timezoneId?: string; userAgent?: string; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]>): boolean
  • Type parameters

    • U: BROWSER_CLOSED

    Parameters

    • externalevent: U
    • externalrest...args: Parameters<BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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: ...; value: ... }[]; origin: string }[] }; strictSelectors?: boolean; timezoneId?: string; userAgent?: string; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]>

    Returns boolean

externaleventNames

  • eventNames<U>(): U[]
  • Type parameters

    • U: BROWSER_CLOSED

    Returns U[]

getCookies

  • getCookies(page: Page): Promise<Cookie[]>
  • Parameters

    • page: Page

    Returns Promise<Cookie[]>

externalgetMaxListeners

  • getMaxListeners(): number
  • Returns number

kill

  • kill(): Promise<void>
  • Immediately kills the browser process.

    Emits 'browserClosed' event.


    Returns Promise<void>

externallistenerCount

  • listenerCount(type: BROWSER_CLOSED): number
  • Parameters

    • externaltype: BROWSER_CLOSED

    Returns number

externallisteners

  • listeners<U>(type: U): BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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: ...; value: ... }[]; origin: string }[] }; strictSelectors?: boolean; timezoneId?: string; userAgent?: string; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U][]
  • Type parameters

    • U: BROWSER_CLOSED

    Parameters

    • externaltype: U

    Returns BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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: ...; value: ... }[]; origin: string }[] }; strictSelectors?: boolean; timezoneId?: string; userAgent?: string; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U][]

normalizeProxyOptions

  • normalizeProxyOptions(proxyUrl: undefined | string, pageOptions: any): Record<string, unknown>
  • Parameters

    • proxyUrl: undefined | string
    • pageOptions: any

    Returns Record<string, unknown>

externaloff

  • off<U>(event: U, listener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]): this
  • Type parameters

    • U: BROWSER_CLOSED

    Parameters

    • externalevent: U
    • externallistener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]

    Returns this

externalon

  • on<U>(event: U, listener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]): this
  • Type parameters

    • U: BROWSER_CLOSED

    Parameters

    • externalevent: U
    • externallistener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]

    Returns this

externalonce

  • once<U>(event: U, listener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]): this
  • Type parameters

    • U: BROWSER_CLOSED

    Parameters

    • externalevent: U
    • externallistener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]

    Returns this

externalprependListener

  • prependListener<U>(event: U, listener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]): this
  • Type parameters

    • U: BROWSER_CLOSED

    Parameters

    • externalevent: U
    • externallistener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]

    Returns this

externalprependOnceListener

  • prependOnceListener<U>(event: U, listener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]): this
  • Type parameters

    • U: BROWSER_CLOSED

    Parameters

    • externalevent: U
    • externallistener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]

    Returns this

externalrawListeners

  • rawListeners<U>(type: U): BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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: ...; value: ... }[]; origin: string }[] }; strictSelectors?: boolean; timezoneId?: string; userAgent?: string; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U][]
  • Type parameters

    • U: BROWSER_CLOSED

    Parameters

    • externaltype: U

    Returns BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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: ...; value: ... }[]; origin: string }[] }; strictSelectors?: boolean; timezoneId?: string; userAgent?: string; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U][]

externalremoveAllListeners

  • removeAllListeners(event?: BROWSER_CLOSED): this
  • Parameters

    • externaloptionalevent: BROWSER_CLOSED

    Returns this

externalremoveListener

  • removeListener<U>(event: U, listener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]): this
  • Type parameters

    • U: BROWSER_CLOSED

    Parameters

    • externalevent: U
    • externallistener: BrowserControllerEvents<BrowserType<{}>, undefined | LaunchOptions, Browser, undefined | { acceptDownloads?: boolean; baseURL?: string; bypassCSP?: boolean; colorScheme?: null | light | dark | no-preference; deviceScaleFactor?: number; extraHTTPHeaders?: {}; forcedColors?: null | active | none; geolocation?: { accuracy?: number; latitude: number; longitude: number }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; 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; 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; videoSize?: { height: number; width: number }; videosPath?: string; viewport?: null | { height: number; width: number } }, Page>[U]

    Returns this

setCookies

  • setCookies(page: Page, cookies: Cookie[]): Promise<void>
  • Parameters

    Returns Promise<void>

externalsetMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • externaln: number

    Returns this