bdd-playwright

Create and maintain BDD Playwright tests from Gherkin feature files with ARIA-first locators.

Updated Feb 6, 2026
One-click install
npx skills add https://github.com/chadananda/xswarm-tdd-claude --skill bdd-playwright
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bdd-playwright
Source: https://github.com/chadananda/xswarm-tdd-claude/tree/main/skills/bdd-playwright
Command: npx skills add https://github.com/chadananda/xswarm-tdd-claude --skill bdd-playwright

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams author and maintain behavior-driven tests for web applications using Gherkin and Playwright, enforcing ARIA-first locators and built-in accessibility checks to reduce flaky tests and improve collaboration between product and QA.

Core Features & Use Cases

  • ARIA-first locators enforcement across all steps to ensure accessible selectors.
  • Gherkin-driven test authoring with automatic mapping to Playwright step definitions.
  • Integrated accessibility audits using axe-core on every UI interaction.
  • Use Case: Create end-to-end acceptance tests for web apps and ensure accessibility compliance.

Quick Start

Create a features/ directory with one or more .feature files and implement corresponding steps in steps/ using ARIA-first locators; install dependencies and run tests with npx playwright test.

Frequently Asked Questions about bdd-playwright

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write BDD tests with Playwright and Gherkin feature files?▼

To write BDD tests with Playwright, you create .feature files using Gherkin syntax and map them to Playwright step definitions. This approach enforces ARIA-first locators and integrates axe-core accessibility audits into every scenario.

Can I run accessibility checks automatically during Playwright end-to-end tests?▼

Yes, automated accessibility checks run during Playwright end-to-end tests by integrating the @axe-core/playwright library. This enforces ARIA-first locators and performs accessibility audits on every UI interaction defined in your Gherkin scenarios.

What is an ARIA-first locator strategy in Playwright BDD testing?▼

An ARIA-first locator strategy in Playwright BDD testing prioritizes accessible selectors over CSS or XPath selectors. It reduces flaky tests by targeting elements through semantic ARIA attributes, ensuring end-to-end tests also verify accessibility compliance.

Does playwright-bdd work with axe-core for acceptance testing?▼

Yes, playwright-bdd works with axe-core by integrating @axe-core/playwright into every scenario. This combination allows teams to describe application behavior in natural language Gherkin while automatically verifying accessibility compliance during acceptance testing.

How do I set up a Playwright project for BDD and accessibility audits?▼

To set up a Playwright project for BDD, create a features/ directory with .feature files and implement corresponding steps in a steps/ directory using ARIA-first locators. Install the required dependencies and execute the test suite using npx playwright test.

Why should my web application tests enforce ARIA-first locators?▼

Enforcing ARIA-first locators in web application tests reduces test flakiness by targeting stable, semantic elements rather than brittle CSS selectors. It also ensures your end-to-end acceptance tests inherently validate accessibility compliance throughout the development lifecycle.