{"_id":"@automite/bdd-playwright-framework","_rev":"8-e4171d7f7a56cb043e7dd42061c75760","name":"@automite/bdd-playwright-framework","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.1":{"name":"@automite/bdd-playwright-framework","version":"1.0.1","keywords":["cucumber","playwright","typescript","bdd","automation","framework","testing"],"author":{"name":"shiyamtj@gmail.com"},"license":"MIT","_id":"@automite/bdd-playwright-framework@1.0.1","maintainers":[{"name":"automite","email":"shiyamtj@gmail.com"}],"dist":{"shasum":"91757e2c17c58c8a13a2b1d3c4c8e9daf7866ae6","tarball":"https://registry.npmjs.org/@automite/bdd-playwright-framework/-/bdd-playwright-framework-1.0.1.tgz","fileCount":24,"integrity":"sha512-WZlu9cjW4jHZSIa1Opixn386usTX3QG87f+kS0pa7gT1XG1/fejZ2YpK7cQRfw8GFXUeR/YmPEycI+WVICLBug==","signatures":[{"sig":"MEQCIHBdYLzFTxxAoBkqCoJNlnRa39C2A77w+9wFcKVu8RZQAiBzEXWrCMGXwn8Acv8cC7WjuB2+dYLUrsDINht6JGB+tA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52707},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"c2144f961131c02b9b7b2d0ccd9a9d3a07cbd3bc","scripts":{"build":"tsc","clean":"rm -rf dist","prebuild":"yarn clean","prepublishOnly":"yarn build"},"_npmUser":{"name":"automite","email":"shiyamtj@gmail.com"},"_npmVersion":"10.8.2","description":"Reusable BDD test automation framework with Playwright and Cucumber","directories":{},"_nodeVersion":"20.20.2","dependencies":{"dotenv":"^16.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.10.5","@playwright/test":"^1.40.1","@cucumber/cucumber":"^9.5.1"},"peerDependencies":{"@playwright/test":"^1.40.0","@cucumber/cucumber":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bdd-playwright-framework_1.0.1_1777127016516_0.5293817569153332","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@automite/bdd-playwright-framework","version":"1.0.2","keywords":["cucumber","playwright","typescript","bdd","automation","framework","testing"],"author":{"name":"shiyamtj@gmail.com"},"license":"MIT","_id":"@automite/bdd-playwright-framework@1.0.2","maintainers":[{"name":"automite","email":"shiyamtj@gmail.com"}],"homepage":"https://github.com/shiyamtj/bdd-playwright-framework#readme","bugs":{"url":"https://github.com/shiyamtj/bdd-playwright-framework/issues"},"dist":{"shasum":"e4b2ccc6f220a5f3846fcebb0b9a2c35c88a5541","tarball":"https://registry.npmjs.org/@automite/bdd-playwright-framework/-/bdd-playwright-framework-1.0.2.tgz","fileCount":24,"integrity":"sha512-VfEJxDE3/ifVxYa0/kxjKJlWei49Cpl4Pp1gJU5sumw+1wmLFtFye3WIoXJTQuTV43U3+26DnUAkZ3bj14axSA==","signatures":[{"sig":"MEYCIQD5yo482Tb6tGWNAK1BA00wHbCq1uU26bW1Ddcm5Nx5dgIhAJjoeh1fdh5ItCD+1jNUWw9pScjjTyayXlru1LkVWK4C","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@automite%2fbdd-playwright-framework@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":52815},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"0d53d953dafe63b27950b3f2313020d2b1365fcb","scripts":{"build":"tsc","clean":"rm -rf dist","prebuild":"yarn clean","prepublishOnly":"yarn build"},"_npmUser":{"name":"automite","email":"shiyamtj@gmail.com"},"repository":{"url":"git+https://github.com/shiyamtj/bdd-playwright-framework.git","type":"git"},"_npmVersion":"10.8.2","description":"Reusable BDD test automation framework with Playwright and Cucumber","directories":{},"_nodeVersion":"20.20.2","dependencies":{"dotenv":"^16.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.10.5","@playwright/test":"^1.40.1","@cucumber/cucumber":"^9.5.1"},"peerDependencies":{"@playwright/test":"^1.40.0","@cucumber/cucumber":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bdd-playwright-framework_1.0.2_1777127425747_0.9283223905348976","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@automite/bdd-playwright-framework","version":"1.0.3","keywords":["cucumber","playwright","typescript","bdd","automation","framework","testing"],"author":{"name":"shiyamtj@gmail.com"},"license":"MIT","_id":"@automite/bdd-playwright-framework@1.0.3","maintainers":[{"name":"automite","email":"shiyamtj@gmail.com"}],"homepage":"https://github.com/shiyamtj/bdd-playwright-framework#readme","bugs":{"url":"https://github.com/shiyamtj/bdd-playwright-framework/issues"},"dist":{"shasum":"fadd0f64008876368d02a08164b9377ec6ee86c5","tarball":"https://registry.npmjs.org/@automite/bdd-playwright-framework/-/bdd-playwright-framework-1.0.3.tgz","fileCount":24,"integrity":"sha512-Vh5zVucg9eZRHwNN322NtT0oOn9wFAImx3mNehN5rv4VK/m8HNsjZG0fzQLgfWC358r33IYL+EEIC9rHG+tk/g==","signatures":[{"sig":"MEUCIQC9ZnR8NrCpF0UkY1S9aCv1jwkIWLTJ5uXyibYgJOJXHQIgIbvplIPRu6qynt6FpKMGhpdoJ+zJy8fNGI1ezY1M/PE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@automite%2fbdd-playwright-framework@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":52851},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"07caec5a532c370b54014ea1894da6e6e9f3437c","scripts":{"build":"tsc","clean":"rm -rf dist","prebuild":"yarn clean","prepublishOnly":"yarn build"},"_npmUser":{"name":"automite","email":"shiyamtj@gmail.com"},"repository":{"url":"git+https://github.com/shiyamtj/bdd-playwright-framework.git","type":"git"},"_npmVersion":"10.8.2","description":"Reusable BDD test automation framework with Playwright and Cucumber","directories":{},"_nodeVersion":"20.20.2","dependencies":{"dotenv":"^16.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.10.5","@playwright/test":"^1.40.1","@cucumber/cucumber":"^9.5.1"},"peerDependencies":{"@playwright/test":"^1.40.0","@cucumber/cucumber":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bdd-playwright-framework_1.0.3_1777209630489_0.516557512197483","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@automite/bdd-playwright-framework","version":"1.0.4","keywords":["cucumber","playwright","typescript","bdd","automation","testing","framework"],"author":{"name":"shiyamtj@gmail.com"},"license":"MIT","_id":"@automite/bdd-playwright-framework@1.0.4","maintainers":[{"name":"automite","email":"shiyamtj@gmail.com"}],"dist":{"shasum":"7d09e95865142614764f41a65393df3893a4f2c0","tarball":"https://registry.npmjs.org/@automite/bdd-playwright-framework/-/bdd-playwright-framework-1.0.4.tgz","fileCount":19,"integrity":"sha512-asUWe6Zr041bZ26IOB54eierTTf1tk/+v4nf1CUGU5hAhrMS28I89tk68tC9Nq+96Ouz2elFR/9xCdyCBEV0tg==","signatures":[{"sig":"MEQCIGQgwtHQcQTAi/VD9xGmli+ublCacKrivj5vM+35/VdbAiAYIyXuM3aIyy0DNEnt91d+qJsukzHXkfJt1bpPkAJsWw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16355},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"npm":"please-use-yarn","yarn":">=1.22.0"},"private":false,"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist","prepack":"yarn build","prepublishOnly":"yarn build"},"_npmUser":{"name":"automite","email":"shiyamtj@gmail.com"},"description":"BDD test automation framework using CucumberJS, Playwright, and TypeScript","directories":{},"dependencies":{"@playwright/test":"^1.40.1","@cucumber/cucumber":"^9.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.10.5"},"_npmOperationalInternal":{"tmp":"tmp/bdd-playwright-framework_1.0.4_1777212263602_0.8934003726361541","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@automite/bdd-playwright-framework","version":"1.0.5","description":"BDD test automation framework using CucumberJS, Playwright, and TypeScript","private":false,"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","dev":"tsc --watch","prepublishOnly":"npm run build","prepack":"npm run build","clean":"rm -rf dist"},"keywords":["cucumber","playwright","typescript","bdd","automation","testing","framework"],"author":{"name":"shiyamtj@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/shiyamtj/bdd-playwright-monorepo.git"},"engines":{"node":">=20.0.0","npm":">=10.0.0"},"dependencies":{"@cucumber/cucumber":"^12.8.2","@playwright/test":"^1.40.1"},"devDependencies":{"@types/node":"^20.10.5","typescript":"^5.3.3"},"publishConfig":{"access":"public"},"_id":"@automite/bdd-playwright-framework@1.0.5","gitHead":"d32ccf1dd64fc7f98b17b9e7f36f4d44d7177055","bugs":{"url":"https://github.com/shiyamtj/bdd-playwright-monorepo/issues"},"homepage":"https://github.com/shiyamtj/bdd-playwright-monorepo#readme","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Y8Tic2Dc2iYOYrJVDMB2svKa8ZEFxgYEt79sUTetWukwCaj9TWU7NARtod2blgtwLjTkWpVxJFxcGKaZNWirPA==","shasum":"c491b7d1ea5831d918b97874a5393faa68327f3c","tarball":"https://registry.npmjs.org/@automite/bdd-playwright-framework/-/bdd-playwright-framework-1.0.5.tgz","fileCount":14,"unpackedSize":16470,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@automite%2fbdd-playwright-framework@1.0.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDOpSoI4flzU2J+WdGOeaRBrXWDNiwdkOuolPaipF+ToAIgUXhwWtoebNon2N2p4ihcGCn7t8Ss8DJK8tLqgVE7RAU="}]},"_npmUser":{"name":"automite","email":"shiyamtj@gmail.com"},"directories":{},"maintainers":[{"name":"automite","email":"shiyamtj@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bdd-playwright-framework_1.0.5_1777213373930_0.8059829432706369"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-25T14:23:36.443Z","modified":"2026-04-26T14:22:54.343Z","1.0.0":"2026-04-25T13:43:47.475Z","1.0.1":"2026-04-25T14:23:36.646Z","1.0.2":"2026-04-25T14:30:25.899Z","1.0.3":"2026-04-26T13:20:30.642Z","1.0.4":"2026-04-26T14:04:23.742Z","1.0.5":"2026-04-26T14:22:54.091Z"},"author":{"name":"shiyamtj@gmail.com"},"license":"MIT","keywords":["cucumber","playwright","typescript","bdd","automation","testing","framework"],"description":"BDD test automation framework using CucumberJS, Playwright, and TypeScript","maintainers":[{"name":"automite","email":"shiyamtj@gmail.com"}],"readme":"# @automite/bdd-playwright-framework\n\nA BDD (Behavior-Driven Development) test automation framework built with CucumberJS, Playwright, and TypeScript. This framework provides a solid foundation for writing maintainable, scalable automated tests using Gherkin syntax.\n\n## Features\n\n- **BDD Testing**: Write tests in Gherkin syntax using CucumberJS\n- **Modern Browser Automation**: Powered by Playwright for reliable cross-browser testing\n- **TypeScript Support**: Full TypeScript support for type-safe test code\n- **Page Object Model**: Built-in BasePage class for implementing POM pattern\n- **Custom World**: Extensible BaseWorld class for scenario context management\n- **Lifecycle Hooks**: Pre-configured Cucumber hooks for test setup and teardown\n- **Logging Utility**: Simple logging utility for test debugging\n- **Configurable**: Environment-based configuration for flexible test execution\n\n## Installation\n\n```bash\nyarn add @automite/bdd-playwright-framework\n```\n\n## Project Structure\n\n```\nframework/\n├── src/\n│   ├── core/\n│   │   ├── BaseWorld.ts       # Custom World class for Cucumber\n│   │   ├── TestRunner.ts      # Test execution manager\n│   │   └── hooks.ts           # Cucumber lifecycle hooks\n│   ├── pages/\n│   │   └── BasePage.ts        # Base Page class for POM\n│   ├── utils/\n│   │   └── logger.ts          # Logging utility\n│   └── index.ts               # Main entry point\n├── dist/                      # Compiled JavaScript output\n├── package.json\n├── tsconfig.json\n└── README.md\n```\n\n## Core Components\n\n### BaseWorld\n\nThe `BaseWorld` class extends Cucumber's World class and provides scenario context management. It includes:\n\n- Page object management\n- Scenario initialization\n- Resource cleanup\n\n```typescript\nimport { BaseWorld } from '@automite/bdd-playwright-framework';\n\nclass CustomWorld extends BaseWorld {\n  // Add custom scenario context\n}\n```\n\n### BasePage\n\nThe `BasePage` class provides common page interaction methods:\n\n- Navigation (`navigateToUrl`, `navigate`)\n- Element interaction (`clickElement`, `fillText`, `clearElement`)\n- Element verification (`waitForElement`, `isElementVisible`, `getElementText`)\n- Selector-based shortcuts (`click`, `fill`, `getText`)\n\n```typescript\nimport { BasePage } from '@automite/bdd-playwright-framework';\n\nclass LoginPage extends BasePage {\n  async login(username: string, password: string) {\n    await this.fill('#username', username);\n    await this.fill('#password', password);\n    await this.click('#login-button');\n  }\n}\n```\n\n### setupHooks\n\nConfigures Cucumber lifecycle hooks with browser management:\n\n- `BeforeAll`: Launches browser and creates context\n- `AfterAll`: Closes browser and context\n- `Before`: Creates new page for each scenario\n- `After`: Closes page after scenario\n\n```typescript\nimport { setupHooks, BaseWorld } from '@automite/bdd-playwright-framework';\n\nsetupHooks(BaseWorld);\n```\n\n### Logger\n\nSimple logging utility with multiple log levels:\n\n```typescript\nimport { logger } from '@automite/bdd-playwright-framework';\n\nlogger.info('Information message');\nlogger.error('Error message');\nlogger.warn('Warning message');\nlogger.debug('Debug message'); // Only when DEBUG=true\n```\n\n## Usage\n\n### Basic Setup\n\n1. Create a custom World class:\n\n```typescript\n// tests/support/CustomWorld.ts\nimport { BaseWorld } from '@automite/bdd-playwright-framework';\n\nexport class CustomWorld extends BaseWorld {\n  // Add custom properties and methods\n}\n```\n\n2. Setup hooks in your support file:\n\n```typescript\n// tests/support/hooks.ts\nimport { setupHooks } from '@automite/bdd-playwright-framework';\nimport { CustomWorld } from './CustomWorld';\n\nsetupHooks(CustomWorld);\n```\n\n3. Create page objects:\n\n```typescript\n// tests/pages/LoginPage.ts\nimport { BasePage } from '@automite/bdd-playwright-framework';\n\nexport class LoginPage extends BasePage {\n  async login(username: string, password: string) {\n    await this.fill('#user-name', username);\n    await this.fill('#password', password);\n    await this.click('#login-button');\n  }\n}\n```\n\n4. Write step definitions:\n\n```typescript\n// tests/steps/login.steps.ts\nimport { Given, When, Then } from '@cucumber/cucumber';\nimport { CustomWorld } from '../support/CustomWorld';\nimport { LoginPage } from '../pages/LoginPage';\n\nGiven('I am on the login page', async function (this: CustomWorld) {\n  const loginPage = new LoginPage(this.page);\n  await loginPage.navigateToUrl('https://example.com/login');\n});\n\nWhen('I enter credentials', async function (this: CustomWorld) {\n  const loginPage = new LoginPage(this.page);\n  await loginPage.login('user@example.com', 'password');\n});\n```\n\n## Environment Variables\n\nConfigure the framework using environment variables:\n\n```bash\n# Browser configuration\nBROWSER=chromium              # Browser type (chromium, firefox, webkit)\nHEADLESS=true                 # Run in headless mode\nSLOW_MO=0                     # Slow down actions (ms)\nVIEWPORT_WIDTH=1280           # Viewport width\nVIEWPORT_HEIGHT=720           # Viewport height\nVIEWPORT_PRESET=desktop       # Viewport preset\n\n# Timeouts\nNAVIGATION_TIMEOUT=30000     # Navigation timeout (ms)\nACTION_TIMEOUT=10000         # Action timeout (ms)\n\n# Debugging\nDEBUG=true                    # Enable debug logs\nENABLE_TRACING=false          # Enable Playwright tracing\n```\n\n## Scripts\n\n```bash\n# Build the framework\nyarn build\n\n# Build in watch mode\nyarn dev\n\n# Clean build artifacts\nyarn clean\n```\n\n## Dependencies\n\n- `@cucumber/cucumber`: ^9.5.1\n- `@playwright/test`: ^1.40.1\n\n## Development\n\nThe framework is written in TypeScript and requires compilation before use:\n\n```bash\nyarn build\n```\n\nThis compiles the TypeScript source files to the `dist` directory.\n\n## License\n\nMIT\n\n## Author\n\nshiyamtj@gmail.com\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues or pull requests.\n","readmeFilename":"README.md","homepage":"https://github.com/shiyamtj/bdd-playwright-monorepo#readme","repository":{"type":"git","url":"git+https://github.com/shiyamtj/bdd-playwright-monorepo.git"},"bugs":{"url":"https://github.com/shiyamtj/bdd-playwright-monorepo/issues"}}