Registry / testing / cucumber-playwright-framework

cucumber-playwright-framework

JSON →
library0.1.0-beta.53jsnpmunverified

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.

npm install cucumber-playwright-framework
INSTALL
IMPORT
SIG · CUCUMBER-PLAYWRIGH
C
cucumber-playwright-framework
testingjavascriptv0.1.0-beta.53
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

stepOpenLandingPageOfAppUsingConfig
import { stepOpenLandingPageOfAppUsingConfig } from 'cucumber-playwright-framework'
const stepOpenLandingPageOfAppUsingConfig = require('cucumber-playwright-framework').stepOpenLandingPageOfAppUsingConfig
ESM-only package; named export from the main entry.
ScenarioWorld
import type { ScenarioWorld } from 'cucumber-playwright-framework'
import { ScenarioWorld } from 'cucumber-playwright-framework'
ScenarioWorld is a type; use import type to avoid runtime inclusion.
default export
import cucumberPlaywrightFramework from 'cucumber-playwright-framework'
const cpw = require('cucumber-playwright-framework')
Default export is available, but caution: may be the library's main object.

Scaffolds a new BDD project using the framework, runs tests, and generates an HTML report.

npx create-bdd-test-framework e2e-test cd e2e-test npm run test npm run test:report
Debug
Known issues
deprecatedPeer dependency '@cucumber/cucumber@^9.0.0' may become incompatible with newer Cucumber versions.
fix
Pin @cucumber/cucumber to ^9.x or check for framework updates.
affects: >=0.1.0-beta.1
breakingThe step 'Given the <actorName> (open|opens) the "<pageName>" page of the "<appName>" app with the "<appURL>" URL' uses regex; incorrect syntax breaks match.
fix
Use exactly '(open|opens)' with parentheses; do not use alternatives without parentheses.
affects: >=0.1.0-beta.1
gotchaTypeScript types are shipped but may require 'esModuleInterop' or 'moduleResolution' set to 'node' in tsconfig.
fix
Set 'esModuleInterop': true and 'moduleResolution': 'node' (or 'node16') in tsconfig.json.
affects: >=0.1.0-beta.30
breakingPlaywright version is pinned to 1.40.0; mismatched versions cause runtime errors.
fix
Ensure both 'playwright' and '@playwright/test' are exactly 1.40.0 in package.json.
affects: >=0.1.0-beta.40
gotchaHTML report generation requires 'cucumber-html-reporter' and a configuration file; missing config causes no report output.
fix
Create a cucumber-html-reporter config file or use the default report path.
affects: >=0.1.0-beta.1
Errors
Common errors & fixes
Cannot find module '@cucumber/cucumber'
Peer dependency @cucumber/cucumber not installed.
fix
Run: npm install @cucumber/cucumber@^9.0.0
TypeError: cucumberPlaywrightFramework.stepOpenLandingPageOfAppUsingConfig is not a function
Using default import instead of named import.
fix
Use named import: import { stepOpenLandingPageOfAppUsingConfig } from 'cucumber-playwright-framework'
Error: Playwright Test runner is not installed. Please install @playwright/test@1.40.0
Missing or mismatched version of @playwright/test.
fix
Run: npm install @playwright/test@1.40.0
Step undefined: Given the user is on the "home" page of the "app" app
Step regex does not match; missing parentheses around 'open|opens'.
fix
Use: Given the user (open|opens) the "home" page of the "app" app
Upgrade
Version history
0.1.0-beta.53latest on npm
Audit
Dependencies
@cucumber/cucumberrequiredCore BDD test runner and Gherkin parser
@playwright/testrequiredPlaywright test runner and browser automation
playwrightrequiredBrowser automation library
@cucumber/pretty-formatteroptionalPretty console output for Cucumber
cucumber-html-reporteroptionalHTML report generation
Agent activity
5 hits · last 30 days
node
4
Resources
cucumber-playwright-framework — npm install cucumber-playwright-framework · libregistry