Chapter 24 · CLI
Chrome, browser automation and computer use from the CLI
Claude Code can operate against a browser: controlling Chrome for testing and automation, and computer use for acting on the machine itself. These are powerful capabilities requiring deliberate permissions.
Video
Steps
- Connect the Chrome integration per the official page and verify the tool sees the browser and can read and click.
- Use browser automation for UI testing: open a page, fill a form and screenshot for verification.
- Computer use extends to desktop actions; enable only in a controlled environment with action approvals.
- Visually verify success: screenshot after important actions, because logical success does not prove the screen is right.
Common pitfall: Browser automation on a real account can perform real actions (sends, purchases); only permit actions you are willing to actually happen.
Hands-on exercise: Run a small UI test: have the tool open a page, fill a field and screenshot. Inspect the screenshot and confirm the action happened.
Filmed demo · Video is added in the media phase
Recap
Comprehension check
Why screenshot after an automated browser action?
Recap
- Chrome integration for UI testing
- Computer use only in controlled environments
- Screenshots for visual verification