playwright-api
Explains how to add playwright API methods.
Works with
--- name: playwright-api description: Explains how to add playwright API methods. license: Apache-2.0 --- # API ## Adding and modifying APIs - Before performing the implementation, go over the steps to understand and plan the work ahead. It is important to follow the steps in order, as some of them are prerequisites for others. - Define (or update) API in `docs/api/class-xxx.md`. For the new methods, params and options use the version from package.json (without -next). - Watch will kick in and re-generate types for the API - Implement the new API in `packages/playwright/src/client/xxx.ts` - Define (or update) channel for the API in `packages/protocol/src/protocol.yml` as needed - Watch will kick in and re-generate types for protocol channels - Implement dispatcher handler in `packages/playwright/src/server/dispatchers/xxxDispatcher.ts` as needed - Handler should just route the call into the corresponding method in `packages/playwright-core/src/server/xxx.ts` - Place new tests in `tests/page/xxx.spec.ts` or create new test file if needed # Build - Assume watch is running and everything is up to date. # Test - If your tests are only using page, prefer to place them in `tests/page/xxx.spec.ts` and use page fixture. If you need to use browser context, place them in `tests/library/xxx.spec.ts`. - Run npm test as `npm run ctest <file>` # Lint - In the end lint via `npm run flint`.
More Testing skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
setup-pre-commit
mattpocock/skills
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

