← Back to Toolkit

Playwright

Library

Reusable software package imported or integrated into application code.

1. What it does

Playwright enables reliable end-to-end testing across Chromium, Firefox, and WebKit with auto-wait assertions, network mocking, and cross-platform browser automation.

2. Why MRPS selected it

The industry standard for deterministic, automated browser integration and end-to-end web testing.

3. Tool Kind

Library: Reusable software package imported or integrated into application code.

4. Original repository

https://github.com/microsoft/playwright

5. Official documentation

https://playwright.dev

6. Author and license

Created by Microsoft under the Apache-2.0 license.

7. Installation

npm init playwright@latest

8. When the AI should use it

Use when running automated browser test suites, executing end-to-end regression tests, or generating trace recordings for frontend debugging.

9. When the AI should not use it

Do not use for simple unit tests of pure algorithmic functions where Jest or Vitest executes significantly faster.

10. What the AI must not do

  • Before you invoke anything, state what you intend to do and why. Do not act until the user confirms. If a rule is ambiguous, ask — do not guess.
  • Always run tests in headless mode unless the user explicitly requests a headed browser window.
  • Never modify test expectations to artificially pass a failing assertion without user consent.
  • Report all test failures with exact assertion details and file locations.

11. MRPS usage instructions

Read TESTING.md

12. Last verified

Verified against live repository on: 2026-11-07

View Complete Agent Constraint Sheet
Tool: Playwright When to use: Use when running automated browser test suites, executing end-to-end regression tests, or generating trace recordings for frontend debugging. When NOT to use: Do not use for simple unit tests of pure algorithmic functions where Jest or Vitest executes significantly faster. Invocation: Execute via npx playwright test or project test scripts. Rules: - Before you invoke anything, state what you intend to do and why. Do not act until the user confirms. If a rule is ambiguous, ask — do not guess. - Always run tests in headless mode unless the user explicitly requests a headed browser window. - Never modify test expectations to artificially pass a failing assertion without user consent. - Report all test failures with exact assertion details and file locations.