For AI agents: a documentation index is available at /llms.txt
Skip to main content

Sync Browser

close​

close() -> None

get_pages​

get_pages() -> list[Page]

new_page​

new_page() -> Page

page​

page() -> ContextManager[Page]

Open a page and close it when the context exits.

with browser.page() as page:
page.goto("https://example.com")

pages​

pages() -> list[Page]
Was this page helpful?