Skip to main content

BaseBrowserPlugin

An abstract base class for browser plugins.

Browser plugins act as wrappers around browser automation tools like Playwright, providing a unified interface for interacting with browsers.

Hierarchy

Index

Methods

__aenter__

  • Enter the context manager and initialize the browser plugin.


    Returns BaseBrowserPlugin

__aexit__

  • async __aexit__(*, exc_type, exc_value, exc_traceback): None
  • Exit the context manager and close the browser plugin.


    Parameters

    • optionalkeyword-onlyexc_type: type[BaseException] | None
    • optionalkeyword-onlyexc_value: BaseException | None
    • optionalkeyword-onlyexc_traceback: TracebackType | None

    Returns None

new_browser

Properties

active

active: bool

Indicates whether the context is active.

AUTOMATION_LIBRARY

AUTOMATION_LIBRARY: str | None

The name of the automation library that the plugin is managing.

browser_launch_options

browser_launch_options: Mapping[str, Any]

Return the options for the browser.launch method.

Keyword arguments to pass to the browser launch method. These options are provided directly to Playwright's browser_type.launch method. For more details, refer to the Playwright documentation: https://playwright.dev/python/docs/api/class-browsertype#browser-type-launch.

browser_new_context_options

browser_new_context_options: Mapping[str, Any]

Return the options for the browser.new_context method.

Keyword arguments to pass to the browser new context method. These options are provided directly to Playwright's browser.new_context method. For more details, refer to the Playwright documentation: https://playwright.dev/python/docs/api/class-browser#browser-new-context.

browser_type

browser_type: BrowserType

Return the browser type name.

max_open_pages_per_browser

max_open_pages_per_browser: int

Return the maximum number of pages that can be opened in a single browser.