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

@appsurify-testmap/rrweb-selenium-plugin

v3.50.1-alpha.1

Published

Drop-in [rrweb](https://github.com/rrweb-io/rrweb) recording for **Selenium v4** (and other W3C WebDriver / WebdriverIO drivers). Wrap the driver you already build with a single `attach(driver)` call — every page, navigation, click and input in the sessio

Readme

@appsurify-testmap/rrweb-selenium-plugin

Drop-in rrweb recording for Selenium v4 (and other W3C WebDriver / WebdriverIO drivers). Wrap the driver you already build with a single attach(driver) call — every page, navigation, click and input in the session is recorded and written as an Appsurify TestMap UI‑coverage report.

It is the Selenium sibling of @appsurify-testmap/rrweb-playwright-plugin and @appsurify-testmap/rrweb-cypress-plugin and produces the same report format.

How it works

The classic W3C WebDriver protocol has no browser→Node push channel, so this plugin bridges events with a polling pump: the inlined rrweb UMD buffers events into window.__testmap_events in the page, and Node executeScripts on a 100 ms interval to atomically swap‑and‑drain that buffer. On driver.get() / navigate() the recorder is stopped, the navigation runs, then rrweb is re‑injected so a multi‑page session is captured as one report. Events carry an incrementing id (via the sequential‑id record plugin), matching the Playwright and Cypress plugins.

The single recording API (attach) is shared across runners; only the per‑test hook wiring differs. Pick the entry point for your runner below.

Install

yarn add -D @appsurify-testmap/rrweb-selenium-plugin selenium-webdriver

In every runner, the only line your tests need:

import { attach } from '@appsurify-testmap/rrweb-selenium-plugin';

const driver = attach(await new Builder().forBrowser('chrome').build());
// ...ordinary Selenium tests, no recording code...

Mocha

.mocharc.cjs:

module.exports = {
  require: ['@appsurify-testmap/rrweb-selenium-plugin/mocha'],
  spec: ['test/**/*.test.cjs'],
  timeout: 60000,
};

Jest

jest.config.cjs:

module.exports = {
  testEnvironment: 'node',
  globalSetup: '@appsurify-testmap/rrweb-selenium-plugin/jest-setup',
  setupFilesAfterEnv: ['@appsurify-testmap/rrweb-selenium-plugin/jest'],
  globalTeardown: '@appsurify-testmap/rrweb-selenium-plugin/jest-teardown',
  testMatch: ['**/test/**/*.test.cjs'],
  testTimeout: 60000,
};

Vitest

vitest.config.ts (globals: true is required):

import { defineConfig } from 'vitest/config';

export default defineConfig({
  test: {
    globals: true,
    environment: 'node',
    setupFiles: ['@appsurify-testmap/rrweb-selenium-plugin/vitest'],
    globalSetup: ['@appsurify-testmap/rrweb-selenium-plugin/vitest-teardown'],
    include: ['test/**/*.test.ts'],
    testTimeout: 60000,
    hookTimeout: 60000,
  },
});

node:test

Import the entry at the top of each test file (or preload with --import):

import '@appsurify-testmap/rrweb-selenium-plugin/node-test';
node --import @appsurify-testmap/rrweb-selenium-plugin/node-test --test test/*.test.mjs

Configuration

resolveConfig reads the output directory from an explicit option, then the TESTMAP_OUTPUT_DIR env var, then the default test-results/selenium/ui.

To pass rrweb record options or a custom output dir, attach with options:

attach(driver, { recordOptions: { maskAllInputs: true }, stabilizeMs: 1000 });

Output

Per‑test JSON files, then a single ZIP bundle:

test-results/selenium/ui/
├── <spec>/<browser>/<suite>-<test>.json   # { events, metadata }
└── ui-coverage-reports.zip                 # all per-test JSON, deflate-compressed

Each report is { events, metadata: { runner, spec, suite, test, browser } } with runner.source === "selenium".

Report cleaning (overwrite, not append)

Like the Playwright and Cypress plugins, the output directory is wiped once at the start of a run so reports are overwritten, never appended. This happens in each runner's single pre‑run hook:

  • Mocha — automatic (mochaGlobalSetup, no extra config).
  • Vitest — automatic (the globalSetup file's setup()).
  • Jest — add globalSetup: '@appsurify-testmap/rrweb-selenium-plugin/jest-setup' (shown above).
  • node:test — Node's runner isolates each file in a subprocess and (≤ 22.x) exposes no single pre‑run hook, so it can't auto‑clean safely. Wipe the output dir yourself before the run, e.g. a pretest script: "pretest": "node -e \"require('fs').rmSync('test-results',{recursive:true,force:true})\"".

Auto‑attach (optional)

To record every driver a Builder creates without touching each build() call:

import { Builder } from 'selenium-webdriver';
import { enableAutoAttach } from '@appsurify-testmap/rrweb-selenium-plugin';

enableAutoAttach(Builder);