{"id":27673,"library":"cucumber-playwright-framework","title":"Cucumber-Playwright Framework","description":"A BDD test automation framework combining Cucumber for behavior-driven development and Playwright for cross-browser web automation. Current version 0.1.0-beta.53, pre-release with frequent updates. Offers pre-built step definitions for common actions (navigation, authentication, element interactions) and generates HTML reports. Differentiates from other BDD frameworks by tightly integrating Playwright's modern API with Cucumber's Gherkin syntax, supporting multiple protocols and auto-waiting. Requires Node >= 16 and peer dependencies @cucumber/cucumber ^9.0.0, @playwright/test 1.40.0, playwright 1.40.0, and reporting tools.","status":"active","version":"0.1.0-beta.53","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","bdd test framework","test framework","cucumber playwright framework","typescript"],"install":[{"cmd":"npm install cucumber-playwright-framework","lang":"bash","label":"npm"},{"cmd":"yarn add cucumber-playwright-framework","lang":"bash","label":"yarn"},{"cmd":"pnpm add cucumber-playwright-framework","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core BDD test runner and Gherkin parser","package":"@cucumber/cucumber","optional":false},{"reason":"Playwright test runner and browser automation","package":"@playwright/test","optional":false},{"reason":"Browser automation library","package":"playwright","optional":false},{"reason":"Pretty console output for Cucumber","package":"@cucumber/pretty-formatter","optional":true},{"reason":"HTML report generation","package":"cucumber-html-reporter","optional":true}],"imports":[{"note":"ESM-only package; named export from the main entry.","wrong":"const stepOpenLandingPageOfAppUsingConfig = require('cucumber-playwright-framework').stepOpenLandingPageOfAppUsingConfig","symbol":"stepOpenLandingPageOfAppUsingConfig","correct":"import { stepOpenLandingPageOfAppUsingConfig } from 'cucumber-playwright-framework'"},{"note":"ScenarioWorld is a type; use import type to avoid runtime inclusion.","wrong":"import { ScenarioWorld } from 'cucumber-playwright-framework'","symbol":"ScenarioWorld","correct":"import type { ScenarioWorld } from 'cucumber-playwright-framework'"},{"note":"Default export is available, but caution: may be the library's main object.","wrong":"const cpw = require('cucumber-playwright-framework')","symbol":"default export","correct":"import cucumberPlaywrightFramework from 'cucumber-playwright-framework'"}],"quickstart":{"code":"npx create-bdd-test-framework e2e-test\ncd e2e-test\nnpm run test\nnpm run test:report","lang":"typescript","description":"Scaffolds a new BDD project using the framework, runs tests, and generates an HTML report."},"warnings":[{"fix":"Pin @cucumber/cucumber to ^9.x or check for framework updates.","message":"Peer dependency '@cucumber/cucumber@^9.0.0' may become incompatible with newer Cucumber versions.","severity":"deprecated","affected_versions":">=0.1.0-beta.1"},{"fix":"Use exactly '(open|opens)' with parentheses; do not use alternatives without parentheses.","message":"The step 'Given the <actorName> (open|opens) the \"<pageName>\" page of the \"<appName>\" app with the \"<appURL>\" URL' uses regex; incorrect syntax breaks match.","severity":"breaking","affected_versions":">=0.1.0-beta.1"},{"fix":"Set 'esModuleInterop': true and 'moduleResolution': 'node' (or 'node16') in tsconfig.json.","message":"TypeScript types are shipped but may require 'esModuleInterop' or 'moduleResolution' set to 'node' in tsconfig.","severity":"gotcha","affected_versions":">=0.1.0-beta.30"},{"fix":"Ensure both 'playwright' and '@playwright/test' are exactly 1.40.0 in package.json.","message":"Playwright version is pinned to 1.40.0; mismatched versions cause runtime errors.","severity":"breaking","affected_versions":">=0.1.0-beta.40"},{"fix":"Create a cucumber-html-reporter config file or use the default report path.","message":"HTML report generation requires 'cucumber-html-reporter' and a configuration file; missing config causes no report output.","severity":"gotcha","affected_versions":">=0.1.0-beta.1"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run: npm install @cucumber/cucumber@^9.0.0","cause":"Peer dependency @cucumber/cucumber not installed.","error":"Cannot find module '@cucumber/cucumber'"},{"fix":"Use named import: import { stepOpenLandingPageOfAppUsingConfig } from 'cucumber-playwright-framework'","cause":"Using default import instead of named import.","error":"TypeError: cucumberPlaywrightFramework.stepOpenLandingPageOfAppUsingConfig is not a function"},{"fix":"Run: npm install @playwright/test@1.40.0","cause":"Missing or mismatched version of @playwright/test.","error":"Error: Playwright Test runner is not installed. Please install @playwright/test@1.40.0"},{"fix":"Use: Given the user (open|opens) the \"home\" page of the \"app\" app","cause":"Step regex does not match; missing parentheses around 'open|opens'.","error":"Step undefined: Given the user is on the \"home\" page of the \"app\" app"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}