A Chrome Extensions flavor of Playwright for automating and testing browser extensions.
Playwright CRX is a Chrome Extensions flavor of the Playwright library that enables automation and testing of browser extensions. It leverages Chrome's debugger API to provide Playwright's powerful automation capabilities specifically for extension contexts, allowing developers to script interactions, record tests, and run assertions within extensions.
Developers building or testing Chrome Extensions who want to automate interactions, create end-to-end tests, or integrate with Playwright's ecosystem for reliable extension testing.
It offers a seamless bridge between Playwright's robust testing framework and Chrome Extensions, providing a dedicated API, recorder tools, and tracing support that are not available in standard Playwright, making extension testing more accessible and integrated.
Playwright for chrome extensions
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses chrome.debugger to implement Playwright's ConnectionTransport, enabling direct control over extensions, as demonstrated in the API example for background service workers automating page interactions.
Provides a Chrome extension for recording Playwright scripts in multiple languages without external dependencies, featuring a side panel, shortcuts like Alt+Shift+R, and configurable options via an options page.
Supports Playwright Trace Viewer for debugging, allowing traces to be captured and uploaded, as shown in the tracing example with screenshots and snapshots.
Offers a TypeScript/JavaScript API to create and control extensions programmatically from service workers, useful for automating complex workflows, with examples like todomvc-crx.
Tied exclusively to Chrome Extensions and the chrome.debugger API, making it unsuitable for testing extensions on other browsers or in non-Chrome environments, which limits cross-browser compatibility.
As noted in the README, it's not intended for writing end-to-end tests; users should use @playwright/test instead, indicating it's specialized and not a drop-in replacement for broader testing needs.
Requires understanding of both Playwright and Chrome Extensions development, with dependencies on debugger permissions that might need additional configurations or user consent, adding setup overhead.