Skip to main content
Version: Next

PuppeteerPlugin

The BrowserPlugin serves two purposes. First, it is the base class that specialized controllers like PuppeteerPlugin or PlaywrightPlugin extend. Second, it allows the user to configure the automation libraries and feed them to BrowserPool for use.

Hierarchy

Index

Constructors

constructor

  • new PuppeteerPlugin(library: __module, options?: BrowserPluginOptions<undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product })>): PuppeteerPlugin
  • Parameters

    • library: __module
    • options: BrowserPluginOptions<undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product })> = {}

    Returns PuppeteerPlugin

Properties

experimentalContainers

experimentalContainers: boolean

launchOptions

launchOptions: undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product })

library

library: __module

name

name: string = ...

optionalproxyUrl

proxyUrl?: string

useIncognitoPages

useIncognitoPages: boolean

optionaluserDataDir

userDataDir?: string

Methods

createController

  • createController(): BrowserController<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>
  • Returns BrowserController<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>

createLaunchContext

  • createLaunchContext(options?: CreateLaunchContextOptions<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>): LaunchContext<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, 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<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page> = {}

    Returns LaunchContext<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>

launch

  • launch(launchContext?: LaunchContext<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page>): Promise<Browser>
  • Launches the browser using provided launch context.


    Parameters

    • launchContext: LaunchContext<__module, undefined | (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & { extraPrefsFirefox?: Record<string, unknown>; product?: Product }), Browser, undefined | ContextOptions, Page> = ...

    Returns Promise<Browser>