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

agentq-playwright

v1.0.69

Published

Sample integrate Playwright (typescript) with AgentQ AI.

Readme

AgentQ for Playwright

Sample integrate Playwright (typescript) with AgentQ AI.

Installation & Usage

Setup & run from scratch (if you need start from sample)

  1. clone this repository
git clone https://github.com/agentq-ai/playwright_typescript.git
  1. install node modules
npm install
  1. Install AgentQ package for Playwright using npm (applicable using yarn as well)
npm install agentq-playwright
  1. Update apiKey on json file agentq.config.json based on your account profile (you must signin first)
export TOKEN="apiKey"
  1. Run your test
npm run test

or

npx playwright test

Setup & run from your own Playwright

  1. Install AgentQ package for Playwright using npm (applicable using yarn as well)
npm install agentq-playwright
  1. Create json file agentq.config.json based on your account profile (you must signin first)
{
  "TOKEN": "apiKey"
}
  1. Below is sample usage q() funciton (using POM and non-POM)

non-POM

  • login.spec.ts
import { q, test } from 'agentq-playwright';
import { expect } from '@playwright/test';

test.describe('Login', () => {
  test('login success', async ({ page }) => {
  await page.goto('https://www.saucedemo.com/');
  await q('user fill "username" field with "standard_user"');
  await q('user fill "password" field with "standard_user"');
  await q('User click "login" button');
  });
});

POM

  • login.page.ts on pages file
import { q } from 'agentq-playwright';
import { type Locator, type Page } from '@playwright/test';


export class LoginPage {
  readonly page: Page;
  readonly error_text: Locator;

  constructor(page: Page) {
    this.page = page;
    this.error_text = page.locator('[data-test="error"]')
  }

  async doLogin() {
    await q('User fill "username" field with "standard_user"');
    await q('User fill "password" field with "standard_user"');
    await q('User click "login" button');
  }
}
  • login_fail.spec.ts
import { test } from "agentq-playwright";
import { expect } from "@playwright/test";
import { LoginPage } from '../pages/login.page';

test.describe('Login', () => {
  test('login failed', async ({ page }) => {
    const loginpage = new LoginPage(page);
    await page.goto('https://www.saucedemo.com');
    await loginpage.doLogin();
    await expect(loginpage.error_text).toBeVisible();
  });
});

Test Run Sync (pull test suite & push results)

Pull a test suite from a test run and automatically report each test's status (passed/failed) back to AgentQ.

  1. Set your credentials as environment variables (or in .env). The recommended way is a company API key — no email/password needed:
AGENTQ_API_KEY=your_company_api_key   # from your AgentQ profile
AGENTQ_PROJECT_ID=your_project_id
AGENTQ_TESTRUN_ID=your_testrun_id
AGENTQ_EMAIL=your_email               # optional: results show this company member as "Created By"

Email/password login is still supported as a fallback (when no API key is set):

AGENTQ_EMAIL=your_email
AGENTQ_PASSWORD=your_password
  1. Pull the test suite for a test run:
npx agentq-pull-testsuite -- --testrunid=YOUR_TESTRUN_ID
  1. Run the generated spec with Playwright. Results (passed/failed, execution time, screenshots, videos) are pushed back to the test run automatically:
npx playwright test

Tip for CI (e.g. GitHub Actions): store AGENTQ_API_KEY as a secret and export it in the workflow. API key auth skips the login endpoint entirely.

Plans and Rate Limits

  • Free: Free of charge
  • Pro & Enterprise : visit www.agentq.id or contact [email protected] to upgrade your plan.