allwright

API ReferencePythonBrowser

Browser

Launch a Chromium or Firefox session and hold the handle every other call goes through. Every client call is synchronous, blocking gRPC underneath — there's no asyncio anywhere in the public API.

chromium / firefox

PropertySince v0.0.14

Pre-built launcher handles for the two supported browsers.

chromium: BrowserType
firefox: BrowserType

Example

from allwright import firefox
browser = firefox.launch()

BrowserType.launch

MethodSince v0.0.14

Launches a browser session of this type. launch_chrome()/launch_firefox() are equivalent shortcuts.

def launch(self, options: LaunchOptions | None = None) -> Browser

Browser.page

MethodSince v0.0.33

Returns the browser's initial page. initial_page()/initial_tab() are aliases.

def page(self) -> Page

Example

page = browser.page()

Browser.new_page

MethodSince v0.0.33

Opens and returns a new page in the same browser session. pages() lists every page tracked so far; new_tab() is an alias.

def new_page(self, options: CommandOptions | None = None) -> Page

Browser.close

MethodSince v0.0.14

Closes the browser session; safe to call more than once.

def close(self) -> None

Example

browser.close()

LaunchOptions

TypeSince v0.0.14

Dataclass of launch-time options: a custom browser binary path and a launch timeout.

LaunchOptions(browser_binary: str | None = None, timeout_ms: int | None = None)