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

openqa

v0.0.6

Published

AI-powered Browser automation in Natural Language using playwright mcp

Readme

OpenQA

AI Powered Natural Language Browser Test Automation

No selectors. No flake. Just plain English.

npm version License: MIT

Features

  • 🗣️ Write Tests in Plain English — Describe what you want, not how to find it. "Add laptop to cart" just works.
  • 📝 BDD & YAML Support — Works with Playwright-BDD, Cucumber.js, or simple YAML files. Zero step definitions needed.
  • 🔌 Any LLM Provider — Claude, OpenAI, or Gemini. Use the model that fits your budget and needs.
  • ⚡ 2-Minute Setupnpx openqa init and you're running tests. No complex configuration.

Powered by: Claude Agent SDKLangChainPlaywright MCP

Quick Start

New Project (YAML, Playwright-BDD, or Cucumber.js):

npx openqa init

This single command will:

  1. Prompt for framework selection (YAML, Playwright-BDD, or Cucumber.js)
  2. Install dependencies and Playwright browsers
  3. Prompt for AI provider (Anthropic or Other)
  4. Show tailored setup instructions

Write tests in YAML or .feature files - AI handles everything!

name: Shopping Tests
tests:
  - name: Buy a product
    steps:
      - Navigate to "https://shop.example.com"
      - Search for "laptop" and add the first result to cart
      - Proceed to checkout and enter shipping details
      - Verify "Order confirmed" appears on the page

YAML with Custom Fixtures (Cloud browsers, custom data, etc.):

name: Cloud Browser Tests
fixtureFile: ./fixtures/browser.js  # Custom Playwright fixtures

tests:
  - name: Test with cloud browser
    steps:
      - Navigate to "https://shop.example.com"
      - Add laptop to cart
// fixtures/browser.js - Custom browser fixture
import { test as base } from '@playwright/test';
import { chromium } from '@playwright/test';

export const test = base.extend({
  browser: [async ({}, use) => {
    const browser = await chromium.connectOverCDP('ws://your-cloud-browser');
    await use(browser);
    await browser.close();
  }, { scope: 'worker' }],
});

Integrations with Existing Projects:


With Existing Playwright-BDD

Step 1: Install OpenQA

npm install openqa

Step 2: Setup authentication

Choose ONE method:

# A. Claude Code CLI (recommended)
claude login

# B. API Key
export ANTHROPIC_API_KEY=your_key

# C. .env file
echo "ANTHROPIC_API_KEY=your_key" > .env

For OpenAI/Google, create .env:

AGENT_TYPE=langchain
DEFAULT_PROVIDER=openai  # or 'google'
OPENAI_API_KEY=your_key

Step 3: Replace step definitions

// features/steps/steps.ts
export { test } from 'openqa/bdd/playwright-bdd';

Step 4: Run tests

npm test

With Existing Cucumber.js

Step 1: Install OpenQA

npm install openqa @playwright/test

Step 2: Setup authentication

Choose ONE method:

# A. Claude Code CLI (recommended)
claude login

# B. API Key
export ANTHROPIC_API_KEY=your_key

# C. .env file
echo "ANTHROPIC_API_KEY=your_key" > .env

For OpenAI/Google, create .env:

AGENT_TYPE=langchain
DEFAULT_PROVIDER=openai  # or 'google'
OPENAI_API_KEY=your_key

Step 3: Replace step definitions

// features/step_definitions/steps.js
import 'openqa/bdd/cucumber';
// Browser setup included automatically!

Step 4: Run tests

npm test

With Existing Playwright

Step 1: Install OpenQA

npm install openqa

Step 2: Setup authentication

Choose ONE method:

# A. Claude Code CLI (recommended)
claude login

# B. API Key
export ANTHROPIC_API_KEY=your_key

# C. .env file
echo "ANTHROPIC_API_KEY=your_key" > .env

For OpenAI/Google, create .env:

AGENT_TYPE=langchain
DEFAULT_PROVIDER=openai  # or 'google'
OPENAI_API_KEY=your_key

Step 3: Use in your tests

import { test } from "@playwright/test";
import { runAgent } from "openqa";

test("AI agent fills form", async ({ page, context }) => {
  await page.goto("https://example.com/form");

  // Agent uses the same browser context
  await runAgent('Fill in the form with test data', context);

  // Verify in the same browser
  await expect(page.locator('input[name="email"]')).toHaveValue("[email protected]");
});

Step 4: Run tests

npx playwright test

How It Works

The agent uses @playwright/mcp with createConnection() to share the browser context. This enables:

  • Shared cookies and session storage
  • Same page state and navigation history
  • True collaborative automation between tests and AI

API Reference

runAgent(prompt, browserContext, options?)

Run AI agent with natural language instruction.

Parameters:

  • prompt (string): Natural language instruction
  • browserContext (BrowserContext): Playwright browser context
  • options (object): Optional configuration
    • verbose (boolean): Enable logging (default: true)
    • agentType (string): 'claude' (default) or 'langchain'
    • provider (string): AI provider ('anthropic', 'openai', 'google')
    • model (string): Model name
    • recursionLimit (number): Max recursion depth (default: 100)

Returns: Promise

BDD Integration

Playwright-BDD (simple):

// features/steps/steps.ts
export { test } from 'openqa/bdd/playwright-bdd';

Playwright-BDD (custom):

import { createAIStep } from 'openqa/bdd/playwright-bdd';

createAIStep({
  verbose: false,
  agentType: 'claude',
});

Cucumber.js:

import 'openqa/bdd/cucumber';

Examples

Requirements

  • Node.js 18+
  • @playwright/test ^1.56.0
  • Claude Code login, Anthropic API key, or other provider API key

Links

  • Website: https://www.auto-browse.com/
  • NPM: https://www.npmjs.com/package/openqa
  • GitHub: https://github.com/auto-browse/openqa

License

MIT