PuppeteerController
Hierarchy
- BrowserController<typeof Puppeteer>
- PuppeteerController
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
browserPlugin: BrowserPlugin<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>
Returns PuppeteerController
Properties
activePages
browser
Browser representation of the underlying automation library.
browserPlugin
The BrowserPlugin
instance used to launch the browser.
id
isActive
lastPageOpenedAt
launchContext
The configuration the browser was launched with.
totalPages
staticexternaldefaultMaxListeners
Methods
externaladdListener
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>[U]
Returns PuppeteerController
close
Gracefully closes the browser and makes sure there will be no lingering browser processes.
Emits 'browserClosed' event.
Returns Promise<void>
externalemit
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externalrest...args: Parameters<BrowserControllerEvents<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>[U]>
Returns boolean
externaleventNames
Type parameters
- U: BROWSER_CLOSED
Returns U[]
getCookies
Parameters
page: Page
Returns Promise<Cookie[]>
externalgetMaxListeners
Returns number
kill
Immediately kills the browser process.
Emits 'browserClosed' event.
Returns Promise<void>
externallistenerCount
Parameters
externaltype: BROWSER_CLOSED
Returns number
externallisteners
Type parameters
- U: BROWSER_CLOSED
Parameters
externaltype: U
Returns BrowserControllerEvents<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>[U][]
normalizeProxyOptions
Parameters
proxyUrl: undefined | string
pageOptions: any
Returns Record<string, unknown>
externaloff
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>[U]
Returns PuppeteerController
externalon
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>[U]
Returns PuppeteerController
externalonce
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>[U]
Returns PuppeteerController
externalprependListener
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>[U]
Returns PuppeteerController
externalprependOnceListener
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>[U]
Returns PuppeteerController
externalrawListeners
Type parameters
- U: BROWSER_CLOSED
Parameters
externaltype: U
Returns BrowserControllerEvents<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>[U][]
externalremoveAllListeners
Parameters
externaloptionalevent: BROWSER_CLOSED
Returns PuppeteerController
externalremoveListener
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>[U]
Returns PuppeteerController
setCookies
Parameters
page: Page
cookies: Cookie[]
Returns Promise<void>
externalsetMaxListeners
Parameters
externaln: number
Returns PuppeteerController
The
BrowserController
serves two purposes. First, it is the base class that specialized controllers likePuppeteerController
orPlaywrightController
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.