Browser Automation Tutorial
Master web automation, scraping, form filling, and data extraction with OpenClaw
Master web automation, scraping, form filling, and data extraction with OpenClaw
In this guide we cover OpenClaw's browser automation—navigating sites, filling forms, extracting data, and building web workflows. Plan for about 25–30 minutes.
Here's what you'll know how to do when you're done:
Before starting:
Browser control is typically enabled by default. Verify it's working:
openclaw agent --message "Navigate to https://example.com and tell me what you see"
If browser control isn't working, check the Troubleshooting Guide.
Configure browser settings in your OpenClaw config:
{
"browser": {
"enabled": true,
"headless": false,
"timeout": 30000
}
}
Let's start with basic web navigation. Ask OpenClaw to visit a website:
Navigate to https://news.ycombinator.com and summarize the top 5 stories
OpenClaw will:
You can guide OpenClaw through websites:
OpenClaw can automatically fill and submit forms. Here's how:
Ask OpenClaw to fill a form:
Go to https://example.com/contact and fill out the contact form with:
- Name: John Doe
- Email: john@example.com
- Message: Hello, I'm interested in your services
For complex forms, provide detailed instructions:
OpenClaw will identify form fields and fill them appropriately.
Extract data from websites for analysis or storage:
Go to https://example.com/article and extract:
- The article title
- The author name
- The main content
- All links in the article
Extract data into structured formats:
Go to https://example.com/products and extract all products with:
- Product name
- Price
- Description
- Image URL
Save this as a JSON file
Automate scraping across multiple pages:
Visit https://example.com/products and:
1. Extract all product links from page 1
2. Visit each product page
3. Extract product details
4. Save all data to products.json
Canvas provides a visual workspace for complex browser interactions:
Canvas is OpenClaw's visual interface that allows the agent to:
Canvas is accessible via:
http://localhost:18789When using browser automation, Canvas can:
Monitor prices on e-commerce sites:
Every day at 9am:
1. Visit https://example.com/product/123
2. Extract the current price
3. Compare with previous price
4. Send me a notification if price dropped
Aggregate news from multiple sources:
Visit these news sites:
- https://news.ycombinator.com
- https://www.reddit.com/r/programming
Extract top 5 stories from each
Create a summary document
Automate research tasks:
Research "OpenClaw AI assistant" and:
1. Search Google for recent articles
2. Visit top 5 results
3. Extract key information
4. Create a research summary document
openclaw gateway logsNow that you understand browser automation, explore these related topics:
Combine browser automation with other OpenClaw features for powerful workflows: