BDD::Behave::Playwright¶
Thin glue between BDD::Behave and WWW::Playwright. It adds browser lifecycle hooks and Playwright-aware matchers to behave examples.
It contains no browser driving of its own. All of that lives in WWW::Playwright.
This distribution is the layer that wires a Playwright page into a behave
describe/it flow and lets you write expectations against it.
Dependency split¶
1 2 3 | |
BDD::Behaveprovides thedescribe/context/it/expectDSL and the matcher protocol.WWW::Playwrightdrives a real browser through a long-lived Node sidecar.BDD::Behave::Playwright(this distribution) connects the two: it manages the browser lifecycle around each example and exposes matchers that assert on PlaywrightPageandLocatorobjects.
What the glue adds¶
- Lifecycle hooks that launch a browser context and page for each example and close them afterward, so examples stay isolated.
- The current
pageexposed to examples as a named subject. - Matchers that reuse Playwright's auto-waiting instead of re-implementing waits.
- Failure diagnostics that capture a screenshot when an example fails.
Installation¶
1 | |
The browser itself is provided by WWW::Playwright, which needs Node and a Playwright Chromium binary available at runtime.