Skip to main content

Documentation Index

Fetch the complete documentation index at: https://libretto.sh/docs/llms.txt

Use this file to discover all available pages before exploring further.

List open browser tabs in a session and target specific pages.

pages

The pages command lists all open pages (tabs) in a session and prints their IDs and URLs.
npx libretto pages --session debug-example

When to use pages

  • A popup or new tab opened during navigation or interaction.
  • exec or snapshot fails because more than one page is open in the session.
  • You are not sure which page holds the relevant state.
After running pages, pass the target page ID to other commands with --page <page-id>:
# List pages
npx libretto pages --session debug-example

# Target a specific page
npx libretto exec --session debug-example --page <page-id> "await page.url()"
npx libretto snapshot --session debug-example --page <page-id>

Flags

--session
string
required
The session to list pages for.