You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -349,23 +346,47 @@ When making changes to theme CSS or templates (e.g., Darkfish or Aliki themes):
349
346
5.**Verify generated files** with `rake verify_generated`
350
347
6.**Don't edit generated files** directly (in `lib/rdoc/markdown/` and `lib/rdoc/rd/`)
351
348
352
-
## Browser MCP for Testing Generated Documentation
349
+
## Playwright MCP for Testing Generated Documentation
353
350
354
-
Browser MCP allows AI agents to visually inspect and interact with the generated HTML documentation. This is useful for verifying CSS styling, layout issues, and overall appearance.
351
+
The Playwright MCP server enables visual inspection and interaction with generated HTML documentation. This is useful for verifying CSS styling, layout issues, and overall appearance.
**MCP Server:**`@playwright/mcp` (Microsoft's official browser automation server)
357
354
358
355
### Setup
359
356
360
-
If Browser MCP is not already installed, users should:
357
+
The Playwright MCP server can be used with any MCP-compatible AI tool (Claude Code, Cursor, GitHub Copilot, OpenAI Agents, etc.).
361
358
362
-
1. Install the BrowserMCP Chrome extension from the Chrome Web Store
363
-
2. Run: `claude mcp add --scope user browsermcp npx @browsermcp/mcp@latest`
364
-
3. Connect a browser tab by clicking the BrowserMCP extension icon and selecting "Connect"
359
+
**Claude Code:**
360
+
361
+
```bash
362
+
/plugin playwright
363
+
```
364
+
365
+
**Other MCP-compatible tools:**
366
+
367
+
```bash
368
+
npx @playwright/mcp@latest
369
+
```
370
+
371
+
Configure your tool to connect to this MCP server. Playwright launches its own browser instance automatically - no manual browser setup or extensions required.
If you encounter `DevTools remote debugging is disallowed by the system admin`, Chrome's debugging is blocked by the machine's policy. Use Firefox instead:
376
+
377
+
```bash
378
+
# Install Firefox for Playwright
379
+
npx playwright install firefox
380
+
381
+
# Add Playwright MCP with Firefox to your project (creates/updates .mcp.json)
If port 8000 is already in use, try another port (e.g., `python3 -m http.server 9000`).
379
400
380
-
Then navigate to the appropriate URL (e.g., `http://localhost:8000`) in your connected browser tab and ask Claude to use browser MCP tools (e.g., "use browser MCP to navigate to <http://localhost:8000> and take a screenshot").
401
+
Then ask the AI assistant to inspect the documentation. It will use the appropriate Playwright tools (`browser_navigate`, `browser_snapshot`, `browser_take_screenshot`, etc.) based on your request.
402
+
403
+
**Example requests:**
381
404
382
-
**Note:** Browser MCP requires a proper HTTP server (not `file://` URLs) for full functionality. The generated documentation must be served via HTTP/HTTPS.
405
+
- "Navigate to `http://localhost:8000` and take a screenshot"
406
+
- "Take a screenshot of the RDoc module page"
407
+
- "Check if code blocks are rendering properly on the Markup page"
408
+
- "Compare the index page before and after my CSS changes"
0 commit comments