WWW::Playwright

Every page of the WWW::Playwright manual, in reading order.

  • Overview A Raku driver for Playwright. Raku owns the API surface and lifecycle. Node owns the browser.
  • Installing WWW::Playwright drives a Node process, so it needs three things in place: Node itself, the playwright npm package, and the Chromium browser binary.
  • Getting started This walks through launching a browser, opening a page, navigating to a local file, and tearing everything down.
  • Actions Actions run against a Locator. Get one from $page.locator($selector), then call an action on it. Playwright auto-waits for the element to be actionable...
  • Queries Queries read state rather than mutating the page. Most run against a Locator; url and title run against the Page.
  • Diagnostics Two tools for capturing what happened during a run: screenshots and traces.
  • Browser A WWW::Playwright::Browser wraps a launched Chromium instance. Get one from WWW::Playwright.launch.
  • Context A WWW::Playwright::Context is an isolated browser session. Get one from Browser.new-context.
  • Page A WWW::Playwright::Page is a single tab. Get one from Context.new-page.
  • Locator A WWW::Playwright::Locator points at one or more elements matched by a selector. Get one from Page.locator or by chaining from another locator. Playwright...
  • Configuration Two environment variables control how the transport finds Node and how much it reports.
  • Troubleshooting Starting the sidecar throws X::WWW::Playwright::NodeNotFound:
  • Wire contract Raku and the Node sidecar speak JSON-RPC 2.0 over stdio with NDJSON framing. Each message is a single line of compact JSON terminated by \n. The wire is...