Playwright May 2026

: Tools like bddgen can convert .feature files into standard Playwright .spec.ts files automatically.

Create a file with the .feature extension (e.g., login.feature ) in a features folder. This file uses syntax to describe a use case.

import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from '@playwright/test'; Given('I navigate to the login page', async ({ page }) => { await page.goto('https://example.com'); }); Use code with caution. Copied to clipboard 3. Configuration & Execution To bridge your feature files with Playwright's test runner: : Use Cucumber or playwright-bdd.