Claude Code can directly control a browser to perform web scraping, UI testing, and debugging.
Claude Code integrates directly with Chrome and can control and interact with it.
Install the Chrome extension:
claude --chromePossible tasks:
Practical example: reproduce and fix a bug
"Go to localhost:3000 and click the login button. Check the console for errors, and if there are any, fix the code."
# Claude:
# 1. opens localhost:3000
# 2. finds and clicks the login button
# 3. checks console error: "Uncaught TypeError: Cannot read property 'email' of undefined"
# 4. finds the relevant code
# 5. fixes with optional chaining: user?.email
# 6. reloads the page to verify
Ado's advice:
"'Fix the bug and verify it works' can now be a single prompt."
When native browser integration is insufficient for dynamic sites, use Playwright MCP.
Install:
claude mcp add -s user playwright npx @playwright/mcp@latest
Benefits of Playwright:
Practical example: automate E2E tests
"Using Playwright, test the full user journey:
- sign up
- log in
- search products
- add to cart
- checkout
Save a screenshot at each step."
If a site blocks Claude's native browser or Playwright, Gemini CLI can be a fallback.
Install Gemini CLI:
npm install -g @google/generative-ai-cli
export GOOGLE_API_KEY=your_api_key
Reddit research workflow ykdojo uses:
# 1. Instruct Claude
> "Use Gemini CLI to find and summarize posts about 'Claude Code' on r/programming"
# 2. Claude runs Gemini CLI in a tmux session
# 3. Gemini crawls and analyzes Reddit
# 4. returns results to Claude
# 5. Claude summarizes and organizes
Multi-model orchestration:
"Write this code with Claude Opus, get a code review from Gemini, then do final optimization with GPT-4"
ykdojo's advice:
"The key is Claude Code's smooth UI/UX. Instead of manually switching CLIs and copy-pasting, Claude Code becomes the central interface that orchestrates everything."