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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@qualweb/playwright-driver

v1.0.0

Published

Playwright browser-automation driver for the QualWeb accessibility evaluator

Readme

QualWeb Playwright driver

Playwright browser-automation driver for the QualWeb accessibility evaluator.

By default, @qualweb/core drives browsers with Puppeteer (plus puppeteer-cluster). This package provides a drop-in alternative driver that uses Playwright instead. Reasons you might want that:

  • your application already ships Playwright (and its managed browsers), and you don't want a second browser stack;
  • you need launch/context options or environments that the bundled Puppeteer Chromium struggles with;
  • you want to run QualWeb's engine in Firefox or WebKit.

How to install

$ npm i @qualweb/core @qualweb/playwright-driver playwright --save
$ npx playwright install chromium

playwright is a peer dependency, so QualWeb always uses the same Playwright version (and browsers) as the rest of your application.

How to run

Pass the driver to the QualWeb constructor. Everything else - start(), evaluate(), stop(), crawl(), plugins, modules - works exactly as with the default Puppeteer driver.

const { QualWeb } = require('@qualweb/core');
const { ACTRulesModule } = require('@qualweb/act-rules');
const { PlaywrightDriver } = require('@qualweb/playwright-driver');

(async () => {
  const driver = new PlaywrightDriver({
    browser: 'chromium', // or 'firefox' / 'webkit'
    launchOptions: { headless: true },
  });

  const qualweb = new QualWeb(undefined, driver);

  await qualweb.start({ maxConcurrency: 4 });

  const reports = await qualweb.evaluate({
    url: 'https://act-rules.github.io/pages/about/',
    modules: [new ACTRulesModule()],
  });

  await qualweb.stop();

  console.log(reports);
})();

Note that browser launch options are given to the driver at construction time. The optional second argument of QualWeb.start() carries Puppeteer launch options for the default driver and is ignored by this one.

Stealth / adblock plugins

The default driver's { stealth: true, adBlock: true } constructor options are Puppeteer-extra plugins. For parity, hand the driver a playwright-extra browser as a custom launcher:

const { chromium } = require('playwright-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');

chromium.use(StealthPlugin());

const driver = new PlaywrightDriver({ launcher: chromium });

Behavior differences from the Puppeteer driver

The driver maps QualWeb's Puppeteer-shaped expectations onto Playwright:

  • waitUntil: 'networkidle0' and 'networkidle2' both map to Playwright's 'networkidle' (arrays collapse to the strongest event).
  • CSP bypass, user agent, and the isMobile/hasTouch viewport flags are context-creation options in Playwright, not per-page setters. The driver owns one browser context per evaluated page and recreates it when those settings change. QualWeb only changes them before navigation, so this is transparent; custom plugins should do the same. Plain width/height viewport changes (e.g. the ACT reflow rule) work at any time.
  • Plugins receive the driver-agnostic page wrapper; page.nativePage is a Playwright Page rather than a Puppeteer one.

License

ISC