Skip to main content
Glama
hsm207

Playwright MCP Extension Repro

by hsm207
README.md
# Playwright MCP Extension Repro

Minimal reproduction showing that standard Chrome extension loading in the Playwright MCP server fails without specific configuration settings.

**Feature Request:** [microsoft/playwright#39569](https://github.com/microsoft/playwright/issues/39569)

## 🚀 Quick Start

1. **Install dependencies:**
   ```bash
   npm install
   ```

2. **Run the matrix test:**
   ```bash
   npm test
   ```

## 📊 What this tests

The script `repro_matrix.ts` compares two configurations:

1. **ADVANCED_CONFIG:** Uses the specific settings identified to enable extensions:
   - `channel: ""` (Reverts to bundled Chromium)
   - `chromiumSandbox: false` (Allows unpacked extension mounting)
   - `allowUnrestrictedFileAccess: true` (Disables protocol guard)

2. **PAVEL_SUGGESTION:** Uses the simplified configuration suggested in the [feature request](https://github.com/microsoft/playwright/issues/39569#issuecomment-4026588287).

## ✅ Success Criteria
- **Background Color:** The extension should inject a content script that turns `example.com` pink (`rgb(255, 192, 203)`).
- **Page Title:** The extension should change the document title to `PINK_EXT_ACTIVE`.