OpenClaw Browser
Automation Guide

Control Chrome with your AI agent. Automate web tasks, scrape data, fill forms, and build powerful browser-based workflows.

Browser Automation Capabilities

What your OpenClaw agent can do with browser automation

Page Navigation

Navigate and interact with web pages

Features:

  • Open URLs and navigate between pages
  • Handle page loading and timeouts
  • Manage browser tabs and windows
  • Navigate browser history

Use Cases:

  • Automated testing workflows
  • Data collection from multiple pages
  • Form submissions across sites
  • Content monitoring and tracking

Element Interaction

Find and interact with page elements

Features:

  • Click buttons and links
  • Fill forms and input fields
  • Select dropdown options
  • Upload files and attachments

Use Cases:

  • Automated form filling
  • E-commerce interactions
  • Social media posting
  • File upload automation

Data Extraction

Extract information from web pages

Features:

  • Scrape text content and data
  • Extract links and media URLs
  • Capture screenshots
  • Parse structured data

Use Cases:

  • Competitive analysis
  • Lead generation
  • Price monitoring
  • Content aggregation

Advanced Actions

Complex browser automation tasks

Features:

  • Handle JavaScript-heavy sites
  • Manage cookies and sessions
  • Execute custom JavaScript
  • Handle pop-ups and alerts

Use Cases:

  • Single Page Application testing
  • Authentication workflows
  • Dynamic content interaction
  • Complex user journeys

Setup Guide

Get browser automation working with OpenClaw

1

Install Browser Dependencies

10 minutes

Set up Chrome and required dependencies

Tasks:

  • Install Google Chrome or Chromium
  • Install ChromeDriver
  • Verify browser accessibility
  • Configure OpenClaw browser settings

Installation Commands:

# macOS
brew install --cask google-chrome
brew install chromedriver

# Ubuntu/Debian
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list
sudo apt update && sudo apt install google-chrome-stable
sudo apt install chromium-chromedriver
2

Configure OpenClaw Browser Skill

15 minutes

Install and configure the browser automation skill

Tasks:

  • Install the browser automation skill
  • Configure browser preferences
  • Set up security and privacy options
  • Test basic browser functionality

Installation Commands:

openclaw skills search browser
openclaw skills install browser-automation
openclaw skills enable browser-automation
openclaw agent add-skill your-agent browser-automation

Configuration (browser-config.json):

{
  "browser": {
    "type": "chrome",
    "headless": false,
    "window_size": {
      "width": 1920,
      "height": 1080
    },
    "timeout": 30,
    "user_agent": "Mozilla/5.0 (compatible; OpenClaw-Agent)",
    "options": [
      "--disable-blink-features=AutomationControlled",
      "--disable-dev-shm-usage",
      "--no-sandbox"
    ]
  }
}
3

Test Browser Connection

5 minutes

Verify browser automation is working

Tasks:

  • Launch browser instance
  • Navigate to test page
  • Perform basic interactions
  • Capture screenshot for verification

Verification Tests:

Browser Launch Test
openclaw browser launch

✓ Expected: Browser window opens successfully

Navigation Test
openclaw browser navigate "https://example.com"

✓ Expected: Page loads and title displays

Screenshot Test
openclaw browser screenshot "test.png"

✓ Expected: Screenshot file created successfully

Automation Examples

Real-world browser automation workflows

Data Collection & Scraping

Extract information from websites automatically

Product Price Monitor

Monitor product prices across e-commerce sites

Workflow:
  1. 1.Navigate to product pages
  2. 2.Extract price information
  3. 3.Compare with historical data
  4. 4.Send alerts for price changes
Configuration:
{
  "name": "price-monitor",
  "schedule": "0 */6 * * *",
  "actions": [
    {
      "type": "browser-navigate",
      "url": "https://example-store.com/product/123"
    },
    {
      "type": "browser-extract",
      "selector": ".price",
      "attribute": "text",
      "variable": "current_price"
    },
    {
      "type": "compare-price",
      "current": "{{current_price}}",
      "threshold": 0.10
    },
    {
      "type": "notify-if-changed",
      "method": "email"
    }
  ]
}
Common Selectors:
price:.price-current, .price, [data-price]
title:h1, .product-title, [data-product-name]
availability:.stock-status, .availability

Job Listing Scraper

Collect job postings from career sites

Workflow:
  1. 1.Search job listings with filters
  2. 2.Extract job details and requirements
  3. 3.Save to database or spreadsheet
  4. 4.Track new postings over time
Configuration:
{
  "name": "job-scraper",
  "target": "https://jobs.example.com",
  "actions": [
    {
      "type": "browser-navigate",
      "url": "{{target}}/search?q=developer&location=remote"
    },
    {
      "type": "browser-extract-multiple",
      "selector": ".job-listing",
      "fields": {
        "title": ".job-title",
        "company": ".company-name", 
        "location": ".job-location",
        "salary": ".salary-range",
        "link": "a[href]@href"
      }
    },
    {
      "type": "save-to-database",
      "table": "job_listings"
    }
  ]
}
Pagination Handling:
{
  "type": "browser-paginate",
  "next_button": ".pagination-next",
  "max_pages": 10,
  "wait_between": "2s"
}

Form Automation & Submissions

Automate form filling and submissions

Lead Generation Forms

Fill contact forms for lead generation

Workflow:
  1. 1.Navigate to target websites
  2. 2.Find and fill contact forms
  3. 3.Submit with business information
  4. 4.Track submission success
Configuration:
{
  "name": "contact-form-filler",
  "actions": [
    {
      "type": "browser-navigate",
      "url": "{{target_website}}/contact"
    },
    {
      "type": "browser-wait-for",
      "selector": "form[name='contact'], #contact-form"
    },
    {
      "type": "browser-fill-form",
      "fields": {
        "name": "{{business_name}}",
        "email": "{{business_email}}",
        "subject": "Partnership Inquiry", 
        "message": "{{custom_message}}"
      }
    },
    {
      "type": "browser-click",
      "selector": "button[type='submit'], .submit-btn"
    },
    {
      "type": "browser-wait-for",
      "selector": ".success-message, .thank-you",
      "timeout": 10
    }
  ]
}
Form Element Selectors:
text inputs:input[type='text'], input[type='email'], textarea
dropdowns:select, .custom-dropdown
checkboxes:input[type='checkbox']
radio buttons:input[type='radio']

Application Submissions

Automate job application submissions

Workflow:
  1. 1.Navigate to application pages
  2. 2.Fill application forms with CV data
  3. 3.Upload required documents
  4. 4.Submit applications and track status
Configuration:
{
  "name": "job-application-bot",
  "actions": [
    {
      "type": "browser-navigate",
      "url": "{{job_application_url}}"
    },
    {
      "type": "browser-fill-form",
      "fields": {
        "first_name": "{{applicant.first_name}}",
        "last_name": "{{applicant.last_name}}",
        "email": "{{applicant.email}}",
        "phone": "{{applicant.phone}}"
      }
    },
    {
      "type": "browser-upload",
      "selector": "input[type='file'][name='cv']",
      "file": "{{applicant.cv_path}}"
    },
    {
      "type": "browser-click",
      "selector": ".apply-button, #submit-application"
    }
  ]
}

Social Media Automation

Automate social media interactions

LinkedIn Connection Bot

Send connection requests with personalized messages

Workflow:
  1. 1.Search for target professionals
  2. 2.Review profiles for relevance
  3. 3.Send personalized connection requests
  4. 4.Track connection acceptance rates
Configuration:
{
  "name": "linkedin-connections",
  "actions": [
    {
      "type": "browser-navigate",
      "url": "https://linkedin.com/search/people"
    },
    {
      "type": "browser-fill",
      "selector": "[placeholder='Search people']",
      "value": "{{search_query}}"
    },
    {
      "type": "browser-extract-multiple",
      "selector": ".search-result",
      "limit": 10,
      "fields": {
        "name": ".name a",
        "title": ".subline",
        "connect_url": ".connect-button@href"
      }
    },
    {
      "type": "browser-click-multiple",
      "selector": ".connect-button",
      "max_clicks": 5,
      "wait_between": "3s"
    }
  ]
}
Ethical Considerations:
  • Respect platform rate limits
  • Use authentic, personalized messages
  • Don't spam or mass-message
  • Follow platform terms of service

Testing & Monitoring

Automated testing and website monitoring

Website Health Monitor

Monitor website functionality and performance

Workflow:
  1. 1.Test critical user journeys
  2. 2.Check for broken links and errors
  3. 3.Monitor page load times
  4. 4.Alert on failures or issues
Configuration:
{
  "name": "website-health-check",
  "schedule": "*/30 * * * *",
  "actions": [
    {
      "type": "browser-navigate",
      "url": "{{website_url}}",
      "timeout": 10
    },
    {
      "type": "browser-check-elements",
      "required": [
        ".header",
        ".navigation", 
        ".main-content",
        ".footer"
      ]
    },
    {
      "type": "browser-test-links",
      "selector": "a[href^='http']",
      "sample": 10
    },
    {
      "type": "browser-measure-performance",
      "metrics": ["load_time", "first_paint"]
    },
    {
      "type": "alert-on-failure",
      "threshold": 10
    }
  ]
}

Advanced Techniques

Professional browser automation strategies

Stealth Browsing

Avoid detection by websites

Methods:

  • Randomize user agents and headers
  • Use proxy rotation
  • Implement human-like delays
  • Handle CAPTCHAs appropriately

Implementation:

{
  "stealth_config": {
    "user_agents": [
      "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
      "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"
    ],
    "delays": {
      "min": 1,
      "max": 3,
      "type": "random"
    },
    "proxy_rotation": true,
    "disable_images": false,
    "viewport_randomization": true
  }
}

Session Management

Handle cookies, authentication, and sessions

Methods:

  • Persist cookies between sessions
  • Handle login workflows
  • Manage multiple accounts
  • Store authentication tokens

Implementation:

{
  "session_config": {
    "cookie_storage": "./cookies/",
    "authentication": {
      "type": "form",
      "login_url": "https://example.com/login",
      "username_field": "#username",
      "password_field": "#password", 
      "submit_button": "#login-btn"
    },
    "session_timeout": "30m",
    "auto_login": true
  }
}

Dynamic Content Handling

Work with JavaScript-heavy and dynamic sites

Methods:

  • Wait for dynamic content to load
  • Handle AJAX requests
  • Execute custom JavaScript
  • Manage WebSocket connections

Implementation:

{
  "dynamic_handling": {
    "wait_strategies": [
      {
        "type": "element_visible",
        "selector": ".dynamic-content",
        "timeout": 15
      },
      {
        "type": "network_idle",
        "timeout": 5
      },
      {
        "type": "custom_js",
        "script": "return document.readyState === 'complete'"
      }
    ]
  }
}

Browser Commands

Essential commands for browser automation

Navigation Commands

openclaw browser launch

Launch new browser instance

Options:

--headless, --window-size=WxH

openclaw browser navigate <url>

Navigate to specific URL

Example:
openclaw browser navigate "https://example.com"

openclaw browser back/forward

Navigate browser history

Example:
openclaw browser back

openclaw browser refresh

Reload current page

Options:

--force, --ignore-cache

Element Interaction

openclaw browser click <selector>

Click on page element

Example:
openclaw browser click "#submit-btn"

openclaw browser fill <selector> <value>

Fill input field with value

Example:
openclaw browser fill "#email" "user@example.com"

openclaw browser select <selector> <option>

Select dropdown option

Example:
openclaw browser select "#country" "USA"

openclaw browser upload <selector> <file>

Upload file to input

Example:
openclaw browser upload "#file-input" "./document.pdf"

Data Extraction

openclaw browser extract <selector>

Extract text from element

Options:

--attribute=attr, --multiple

openclaw browser screenshot <filename>

Take page screenshot

Options:

--full-page, --element=selector

openclaw browser links

Extract all page links

Options:

--internal-only, --external-only

openclaw browser table <selector>

Extract table data as JSON

Example:
openclaw browser table "#data-table"

Troubleshooting

Common browser automation issues and solutions

Browser Won't Launch

Symptoms:

  • Chrome/ChromeDriver not found errors
  • Permission denied messages
  • Browser crashes on startup

Solutions:

  • Verify Chrome installation: which google-chrome
  • Check ChromeDriver version compatibility
  • Add --no-sandbox flag for Linux containers
  • Ensure correct PATH environment variables
  • Try running with --headless mode first

Elements Not Found

Symptoms:

  • Selector not found errors
  • Timeouts waiting for elements
  • Intermittent element detection

Solutions:

  • Use browser dev tools to verify selectors
  • Add explicit waits for dynamic content
  • Check for iframes or shadow DOM
  • Try multiple selector strategies (CSS, XPath)
  • Wait for page load completion

Detection by Websites

Symptoms:

  • CAPTCHA challenges appearing
  • IP address blocked
  • Unusual traffic warnings

Solutions:

  • Implement human-like delays and patterns
  • Rotate user agents and headers
  • Use proxy rotation
  • Respect robots.txt and rate limits
  • Consider API alternatives when available

Performance Issues

Symptoms:

  • Slow page loading times
  • High memory usage
  • Browser becomes unresponsive

Solutions:

  • Enable headless mode for faster execution
  • Disable images and CSS loading
  • Close unused tabs and windows
  • Increase browser timeout values
  • Monitor and limit concurrent instances

Need Help with
Browser Automation?

Get expert assistance building sophisticated browser automation workflows for your business needs.

  • Custom automation development
  • Anti-detection strategies
  • Performance optimization

Browser Automation Help

Build powerful web automation workflows

No obligation. We'll reply within 24 hours.