Skip to main content
Version: Next

IBrowserController <Page>

The minimal public contract of a browser controller.

Coordination with the pool (page-counting, activate, assignBrowser, lifecycle promises, …) is intentionally not part of this contract.

Implemented by

Index

Properties

readonlybrowser

browser: unknown

The raw browser handle from the underlying automation library (Puppeteer Browser, Playwright Browser/BrowserContext, …). Escape hatch for things the controller does not expose directly.

readonlyid

id: string

A stable identifier for this controller instance. Useful for tracking which browser served which request.

readonlylaunchContext

launchContext: IBrowserLaunchContext

The configuration the underlying browser was launched with — proxy URL, fingerprint, session, launcher-specific options, etc.

Methods

close

  • close(): Promise<void>
  • Gracefully closes the browser this controller owns. After this resolves, the controller is no longer usable.


    Returns Promise<void>

getCookies

  • getCookies(page): Promise<Cookie[]>
  • Reads cookies for the given page.


    Parameters

    • page: Page

    Returns Promise<Cookie[]>

setCookies

  • setCookies(page, cookies): Promise<void>
  • Writes cookies for the given page.


    Parameters

    Returns Promise<void>