docs/tools-reference/browser-automation.mdx
Browser automation allows Cline to interact with web content directly through a controlled Chrome instance. It can view websites, test applications, fill forms, and capture screenshots.
Ask Cline to use the browser with simple instructions:
Use the browser to check https://example.com
Click the login button
Type 'Hello world' in the search box
Scroll down to see more content
Close the browser
Start my React app with "npm start" and check if it's working at http://localhost:3000
Visit https://example.com and tell me about its design and layout
Go to https://example.com/contact, fill out the form with test data, and submit
Cline can only run one browser at a time. To visit a different site:
Close the browser before editing files or running commands:
Close the browser and update the CSS to fix the alignment issue we saw
The browser has a fixed 900x600 pixel viewport. Cline shares screenshots after each action so you see exactly what it sees.
Cline captures browser console logs, which is helpful for debugging. These are included with each screenshot.
| Issue | Solution |
|---|---|
| Website doesn't load | Use full URL with http:// or https:// |
| Click doesn't work | Describe element location more precisely |
| Browser seems stuck | Close browser and try again |
When running VS Code in WSL, configure Windows to allow WSL to connect to Chrome:
New-NetFirewallRule -DisplayName "WSL Chrome Debug" -Direction Inbound -LocalPort 9222 -Protocol TCP -Action Allow
C:\Program Files\Google\Chrome\Application\chrome.exe)