npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

playwright-automation-bdd

v1.0.11

Published

<br> # core-playwright-automation

Readme

Overview:

This is a sample test automation framework developed using Playwright with Cucumber.

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API. Playwright is built to enable cross-browser web automation that is ever-green, capable, reliable and fast.

Cucumber is a tool for running automated tests written in plain language. Because they're written in plain language, they can be read by anyone on your team. Because they can be read by anyone, you can use them to help improve communication, collaboration and trust on your team. Cucumber supports behavior-driven development. Central to the Cucumber BDD approach is its ordinary language parser called Gherkin.

Features

  • This testing framework supports Behavior Driven Development (BDD). Tests are written in plain English text called Gherkin
  • Framework has built in library to operate on UI, API (REST API).
  • Supports execution of tests in different browsers.
  • Supports running scenarios in parallel mode. It runs 2 scenarios in parallel by default.
  • Flaky scenario can be Retried multiple times until either it passes or the maximum number of attempts is reached. You can enable this via the retry configuration option.
  • Supports rerun of the failed scenarios.
  • Scenarios can be easily skipped by adding @ignore tag to scenarios
  • Supports dry run of scenarios this helps to identifies the undefined and ambiguous steps.
  • Has utility built in for file download, Read PDF files etc.
  • Generates Cucumber HTML Report & HTML Report.
  • HTML reports are included with snapshots and video in case of failed scenarios.
  • Test execution logs are captured in the log file.
  • All the configuration are controlled by .env file and environment variables can be modified at runtime.
  • Easy and simple integration to CI/CD tools like Jenkins.

Supported Browsers

  1. Chrome - default browser
  2. Firefox
  3. MS Edge
  4. WebKit - web browser engine used by Safari

Steps to use

1. Installation

Playwright framework requires Node.js v14+ to run.

Code from github need to be cloned using git command or install package.

Install playwright-automation-bdd package using below command.

npm i playwright-automation-bdd

Install playwright, cucumber, typescript, ts-nod.

npm i --save-dev playwright @cucumber/cucumber ts-node typescript
npm i --save-dev @types/node

Generate tsconfig.json and change value of stric to false to turn off all strict type checking rules, making the code more flexible but reducing type safety

npx tsc --init

Install the missing libraries in the package to use it, such as: dotenv, moment, randomstring, xpath,...