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
@@ -302,23 +299,47 @@ When making changes to theme CSS or templates (e.g., Darkfish or Aliki themes):
302
299
5.**Verify generated files** with `rake verify_generated`
303
300
6.**Don't edit generated files** directly (in `lib/rdoc/markdown/` and `lib/rdoc/rd/`)
304
301
305
-
## Browser MCP for Testing Generated Documentation
302
+
## Playwright MCP for Testing Generated Documentation
306
303
307
-
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.
304
+
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)
310
307
311
308
### Setup
312
309
313
-
If Browser MCP is not already installed, users should:
310
+
The Playwright MCP server can be used with any MCP-compatible AI tool (Claude Code, Cursor, GitHub Copilot, OpenAI Agents, etc.).
314
311
315
-
1. Install the BrowserMCP Chrome extension from the Chrome Web Store
316
-
2. Run: `claude mcp add --scope user browsermcp npx @browsermcp/mcp@latest`
317
-
3. Connect a browser tab by clicking the BrowserMCP extension icon and selecting "Connect"
312
+
**Claude Code:**
313
+
314
+
```bash
315
+
/plugin playwright
316
+
```
317
+
318
+
**Other MCP-compatible tools:**
319
+
320
+
```bash
321
+
npx @playwright/mcp@latest
322
+
```
323
+
324
+
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:
329
+
330
+
```bash
331
+
# Install Firefox for Playwright
332
+
npx playwright install firefox
333
+
334
+
# 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`).
332
353
333
-
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").
354
+
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.
355
+
356
+
**Example requests:**
334
357
335
-
**Note:** Browser MCP requires a proper HTTP server (not `file://` URLs) for full functionality. The generated documentation must be served via HTTP/HTTPS.
358
+
- "Navigate to `http://localhost:8000` and take a screenshot"
359
+
- "Take a screenshot of the RDoc module page"
360
+
- "Check if code blocks are rendering properly on the Markup page"
361
+
- "Compare the index page before and after my CSS changes"
0 commit comments