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

pw-core

v1.1.1

Published

Developer-first Playwright framework with typed page objects, components, assertions, and reusable automation utilities.

Readme

pw-core

A developer-first framework layer built on top of Playwright for creating readable, scalable, maintainable, and AI-friendly automation frameworks.

pw-core standardizes how pages, locators, components, assertions, and fixtures are defined so teams can focus on writing tests instead of maintaining framework code.


Documentation


Installation & Setup

Quick Start (Recommended)

To initialize a brand new test suite pre-configured with pw-core, run:

npm init pw-core

This will automatically:

  • Set up a clean folder structure with template examples in src/pages and src/tests
  • Create playwright.config.ts and tsconfig.json configurations
  • Install pw-core, @playwright/test, and typescript dependencies
  • Download required Playwright browser binaries

Manual Installation

If you want to add pw-core to an existing Playwright project, install it manually:

npm install pw-core

Core Philosophy

| Goal | Value | | :--------------------- | :------------------------------------------------------ | | Single Source of Truth | URLs, selectors, and testIds live in one place | | Readability | Tests should read like business workflows | | Scalability | Adding pages should not increase framework complexity | | Reusability | Components should be defined once and reused everywhere | | Type Safety | Catch mistakes during development instead of runtime | | AI-Friendly | Standardized patterns reduce context and token usage | | Maintainability | Update locators once, not across hundreds of tests |


Available Custom Methods

The following custom methods are available on TypedPage objects:

Navigation & Lifecycle

  • goto(options?): Navigate to the configured page URL.
  • reload(options?): Reload the current page.
  • waitForLoadState(state?, options?): Wait for the page to reach the specified load state (e.g. 'load' | 'domcontentloaded' | 'networkidle').
  • waitForURL(pattern?, options?): Wait for the page navigation to match the configured page URL or a custom pattern.

Assertions

  • verify(key, options?): Assertions chain wrapper (e.g. await page.verify('submit').toBeVisible()). Supports nth and hasText filtering.
  • verifyURL(url?, options?): Assert the current URL matches the page configuration URL or a custom string/RegExp pattern.
  • verifyTitle(title, options?): Assert the page title matches the expected title string or RegExp pattern.
  • verifyHidden(key, options?): Shortcut assertion to verify a locator is hidden. Supports nth and hasText options.
  • verifyEnabled(key, options?): Shortcut assertion to verify a locator is enabled. Supports nth and hasText options.
  • verifyDisabled(key, options?): Shortcut assertion to verify a locator is disabled. Supports nth and hasText options.

Locators

  • expect(key): Returns raw Playwright expectation: expect(locator).
  • resolveLocator(key, options?): Returns the raw Playwright Locator resolved from the page config. Options support { nth, hasText, raw }.
  • locator(key, options?): Returns a proxied, step-wrapped Playwright Locator. Options support { nth, hasText }.

License

MIT