Browser launch accepts the generated Playwright browser and context launch options, excluding Playwright’s raw persistentContext and userDataDir fields. QA Wolf adds browserContext, reintroduces userDataDir for persistent launches, and maps those options back to the underlying Playwright shape.
QA Wolf maps browserContext: "persistent" to Playwright’s persistent context mode. Pass userDataDir with browserContext: "persistent" when you want to reuse a profile directory.Browser example:
Electron launch-enabled flows receive the first Electron window as page.
test(...) can be omitted for simple flows where grouping steps into named sub-steps doesn’t add value. For most flows, wrapping steps in test(...) is recommended — the label appears in your results and makes failures easier to locate.
testContextDependencies is exported for runner and tooling integration. Flow authors should usually use the public callback parameters above instead of depending on the raw runner dependency list.
The exported expect is the assertion helper for web flows, backed by Playwright’s expect. All Playwright matchers are available — including auto-retrying locator matchers like toBeVisible, toHaveText, toHaveURL, and toHaveScreenshot. See Playwright’s locator assertions reference for the full list.Always import expect from @qawolf/flows/web rather than from @playwright/test directly, so that QA Wolf’s defaults (custom timeout, visual diffing) stay in effect.To assert on the meaning of AI-generated text rather than its exact wording, use ai.expect(locator).toSatisfy(...) from @qawolf/ai/web. See Assert on the meaning of generated text.Example: