PlaywrightPersistentBrowser
Index
Methods
__init__
Parameters
browser_type: BrowserType
user_data_dir: (str | Path) | None
browser_launch_options: dict[str, Any]
Returns None
close
Close browser by closing its context.
Parameters
kwargs: Any
Returns None
is_connected
Returns bool
new_browser_cdp_session
Returns CDPSession
new_context
Create persistent context instead of regular one. Merge launch options with context options.
Parameters
context_options: Any
Returns BrowserContext
new_page
Parameters
kwargs: Any
Returns Page
start_tracing
Parameters
kwargs: Any
Returns None
stop_tracing
Parameters
kwargs: Any
Returns bytes
A wrapper for Playwright's
Browser
that operates with a persistent context.It utilizes Playwright's persistent browser context feature, maintaining user data across sessions. While it follows the same interface as Playwright's
Browser
class, there is no abstract base class enforcing this. There is a limitation that only a single persistent context is allowed.