Skip to main content
Version: 3.9

abstractBrowserPlugin <Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>

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 BrowserPlugin<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>(library: Library, options?: BrowserPluginOptions<LibraryOptions>): BrowserPlugin<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>
  • Type parameters

    • Library: CommonLibrary = CommonLibrary
    • LibraryOptions: undefined | Dictionary = Parameters<Library[launch]>[0]
    • LaunchResult: CommonBrowser = UnwrapPromise<ReturnType<Library[launch]>>
    • NewPageOptions = Parameters<LaunchResult[newPage]>[0]
    • NewPageResult = UnwrapPromise<ReturnType<LaunchResult[newPage]>>

    Parameters

    Returns BrowserPlugin<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>

Properties

experimentalContainers

experimentalContainers: boolean

launchOptions

launchOptions: LibraryOptions

library

library: Library

name

name: string = ...

optionalproxyUrl

proxyUrl?: string

useIncognitoPages

useIncognitoPages: boolean

optionaluserDataDir

userDataDir?: string

Methods

createController

  • createController(): BrowserController<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>
  • Returns BrowserController<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>

createLaunchContext

  • createLaunchContext(options?: CreateLaunchContextOptions<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>): LaunchContext<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>
  • 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

    Returns LaunchContext<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>

launch

  • launch(launchContext?: LaunchContext<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>): Promise<LaunchResult>
  • Launches the browser using provided launch context.


    Parameters

    • launchContext: LaunchContext<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult> = ...

    Returns Promise<LaunchResult>