DEV Community

TechLatest
TechLatest

Posted on Originally published at Medium on

I Let OpenClaw Control a Browser and Automate Real Web Tasks

What happens when you give an AI agent control of a web browser instead of simply asking it questions?

Most AI assistants can explain how to navigate a website, fill out a form, or collect information from a webpage. But actually performing those actions is a different challenge. An agent needs to understand the page, identify the right elements, interact with them, handle unexpected situations, and verify whether the task was completed successfully.

That’s exactly what I wanted to test with OpenClaw.

I already had OpenClaw running on my Mac mini, and after experimenting with its workspace, Markdown files, and Obsidian-powered Second Brain, I wanted to explore another capability: browser automation.

The idea was to let OpenClaw interact with websites and give it practical tasks that normally require manual browser interaction.

Instead of testing just one simple action, I planned a series of experiments:

  • Browser access: Can OpenClaw open a website and understand what’s on the page?
  • Website navigation: Can it navigate between pages and follow links?
  • Information extraction: Can it collect useful information from websites and organize the results?
  • Form automation: Can it identify fields and fill out a harmless test form?
  • Multi-step tasks: Can it complete a workflow involving multiple browser actions?
  • Error handling: What happens when a page behaves unexpectedly or an action fails?
  • Task verification: Can it confirm that the requested operation actually succeeded?

I’ll use real browser interactions and capture the results at each stage. I’ll also look at the limitations and security considerations involved in giving an AI agent access to a browser.

The goal isn’t simply to make OpenClaw open a website. I want to find out how far it can go when given control of a browser and a set of practical web tasks.

Let’s put OpenClaw to the test.

Skip the Manual OpenClaw Setup with a Pre-Configured VM

In this experiment, we installed OpenClaw locally and used its existing workspace to build an Obsidian-powered Second Brain.

However, if you don’t want to go through the manual OpenClaw installation and environment configuration, there’s another option: a pre-configured cloud VM.

TechLatest OpenClaw VM — AI Agent Automation Stack provides an environment with OpenClaw, Ollama, required dependencies, and runtime components already installed.

You can deploy it on AWS, Azure, or GCP , with CPU and GPU configurations available depending on your workload.

Available deployment options

  • CPU deployments: Suitable for lightweight workloads and API-based model integrations.
  • GPU deployments: Designed for workloads involving local model inference with Ollama.
  • Pre-installed OpenClaw: Start working with an AI agent without configuring the entire environment manually.
  • Ollama: Run supported local language models within your cloud environment.

Deployment guides

Once OpenClaw is running, you can explore a similar Second Brain workflow by creating a dedicated Markdown knowledge base in its workspace and opening that folder in an Obsidian environment that can access the same files.

One important distinction: The cloud VM simplifies OpenClaw deployment, but it does not automatically configure Obsidian or synchronize your local vault. You’ll need to arrange access to the same Markdown files separately.

If you’d rather start with a pre-configured OpenClaw environment, explore the TechLatest OpenClaw VM.

Step 1: Check the Environment and OpenClaw Installation

Before experimenting with browser automation, let’s inspect the existing OpenClaw installation and verify which browsers are available on our system.

For this experiment, I’m using my Mac mini, where OpenClaw is already installed.

We’ll check three things:

  • OpenClaw installation: Confirm the installed version.
  • OpenClaw commands: Inspect the available CLI commands and identify browser-related capabilities.
  • Browser installation: Check which browsers are available on macOS.

Check the OpenClaw version

Open Terminal and run:

openclaw --version
Enter fullscreen mode Exit fullscreen mode

This confirms which OpenClaw version we’re using for the experiment.

Inspect available OpenClaw commands

Next, run:

openclaw --help
Enter fullscreen mode Exit fullscreen mode

This displays the available commands and options supported by the installed version. We’ll use this information to identify the appropriate browser configuration and control commands.

Check installed browsers

On macOS, run:

ls /Applications | grep -Ei 'Chrome|Firefox|Brave|Arc|Safari'
Enter fullscreen mode Exit fullscreen mode

This helps identify the browsers installed in the Applications directory.


Component | Details | Status

Operating System macOS Verified

OpenClaw 2026.9.3 (1391f7c) Verified

Browser CLI openclaw browser Available

Google Chrome Installed Verified

Brave Browser Installed Verified

Safari Installed Verified
Enter fullscreen mode Exit fullscreen mode

I ran the initial checks on my Mac mini and confirmed that OpenClaw 2026.9.3 (1391f7c) is installed and working.

The CLI help output revealed something particularly interesting: OpenClaw includes a dedicated browser command for managing its browser environment.

I also checked the installed browsers and found Google Chrome, Brave Browser, and Safari available on my system.

Step 2: Inspect OpenClaw Browser Commands

Run this single command in Terminal:

openclaw browser --help
Enter fullscreen mode Exit fullscreen mode

The output revealed several browser automation commands that allow OpenClaw to interact with web pages programmatically.

Some of the most interesting capabilities include:

Command Purpose

browser start Starts the managed browser.
browser open Opens a website in a new tab.
browser navigate Navigates to a specified URL.
browser snapshot Captures webpage content and structure.
browser click Clicks an element on a webpage.
browser type Enters text into page elements.
browser fill Fills out form fields.
browser screenshot Captures browser screenshots.
browser evaluate Executes JavaScript on the current page or a selected element.
browser tabs Lists currently open browser tabs.
browser download Downloads files through browser interactions.
browser batch Executes multiple browser actions in a single call.
Enter fullscreen mode Exit fullscreen mode

The CLI also includes commands for handling cookies, browser profiles, page errors, console messages, network requests, and browser dialogs.

This gives us several ways to test browser automation beyond simply opening a website.

Before interacting with any website, however, we need to check whether the dedicated browser environment is ready.

Step 3: Start the OpenClaw browser

Run this command:

openclaw browser start
Enter fullscreen mode Exit fullscreen mode

OpenClaw returned the following information:

profile: openclaw
enabled: true
running: true
transport: cdp
cdpPort: 18800
cdpUrl: http://127.0.0.1:18800
browser: chrome
detectedBrowser: chrome
detectedPath: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
headless: false (default)
profileColor: #FF4500
Enter fullscreen mode Exit fullscreen mode

The output confirmed that the browser was enabled, running, and connected through Chrome DevTools Protocol (CDP).

Browser Configuration Results

| Property | Verified Value |
| -------------------- | -------------------------------------------------------------- |
| Active profile | `openclaw` |
| Browser enabled | `true` |
| Browser running | `true` |
| Connection transport | `cdp` |
| CDP port | `18800` |
| CDP endpoint | `http://127.0.0.1:18800` |
| Browser | Google Chrome |
| Detected browser | Chrome |
| Chrome executable | `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome` |
| Headless mode | `false` |
| Graphics backend | ANGLE Metal |
Enter fullscreen mode Exit fullscreen mode

One important detail is that OpenClaw was running in visible browser mode (headless: false). This means the browser session was not configured to run headlessly.

The graphics information also showed that Chrome was using the Apple M4 Metal graphics backend.

What This Confirms

At this point, three things were verified:

  • OpenClaw’s browser plugin was enabled.
  • The managed Chrome browser started successfully.
  • The browser-control endpoint was available locally through CDP on port 18800.

This was an important checkpoint. Instead of assuming browser automation was ready just because the startup command succeeded, I verified the browser's actual status and connection details.

Result: The OpenClaw browser environment was successfully initialized. Next, I opened a public website to test whether OpenClaw could inspect and interact with real webpage content.

Step 4: Open a Website Using OpenClaw

Now that the browser is running and the CDP connection is verified, let’s test whether OpenClaw can navigate to a real website.

We’ll start with example.coma safe public test website.

Run this command in your terminal:

openclaw browser open https://example.com
Enter fullscreen mode Exit fullscreen mode


Verified results

Property Actual result
Command openclaw browser open https://example.com
Website https://example.com/
Navigation status Successful
Browser tab ID t1
Tab identifier 08D879BE615D7F1109C172699ACB3850
Enter fullscreen mode Exit fullscreen mode

Step 5: Inspect the webpage using a browser snapshot

I ran:

openclaw browser snapshot
Enter fullscreen mode Exit fullscreen mode

OpenClaw returned a structured snapshot of example.com.

What OpenClaw extracted:

Element Extracted result
Page structure generic
Active page active
English paragraph Documentation example-domain notice
Arabic paragraph Extracted
Chinese paragraph Extracted
French paragraph Extracted
Russian paragraph Extracted
Spanish paragraph Extracted
Link text Learn more
Link destination https://iana.org/help/example-domains
Link reference e13
Enter fullscreen mode Exit fullscreen mode

What makes this interesting?

OpenClaw didn’t just confirm that the website was open. It returned the webpage’s content in a structured format.

For example:

- generic [active] [ref=e1]:
  - paragraph [ref=e7]: This domain is for use in documentation examples...
  - link "Learn more" [ref=e13] [cursor=pointer]:
    - /url: https://iana.org/help/example-domains
Enter fullscreen mode Exit fullscreen mode

The ref identifiers are particularly useful because they give us references to webpage elements that can be used in subsequent browser interactions.

Experiment result: OpenClaw successfully navigated to a public website and extracted its visible page structure and content, including a link and its destination.

Step 6: Click a webpage element using its reference

After identifying the link in the previous snapshot, I ran:

openclaw browser click e13
Enter fullscreen mode Exit fullscreen mode

OpenClaw returned:

clicked ref e13 on https://www.iana.org/help/example-domains

Verified results

Property Result
Action Click
Element reference e13
Element text Learn more
Destination https://www.iana.org/help/example-domains
Click operation Successful
Navigation destination IANA Help – Example Domains
Enter fullscreen mode Exit fullscreen mode

What did this demonstrate?

OpenClaw can use element references returned by a browser snapshot to interact with webpage elements.

This demonstrates a basic browser automation workflow:

  • Open a website.
  • Inspect its structure using a snapshot.
  • Identify an interactive element.
  • Click that element using its reference.
  • Navigate to the destination.

Step 7: Verify Navigation and Extract Content from the Destination Page

After successfully clicking the Learn more link, I wanted to verify whether OpenClaw had actually navigated to the destination page and could inspect its content.

I ran the browser snapshot command again:

openclaw browser snapshot
Enter fullscreen mode Exit fullscreen mode

This time, OpenClaw returned a much more detailed snapshot of the IANA website.

What OpenClaw Extracted

The snapshot contained several types of webpage elements:

Element Extracted Information

Page Heading Example Domains
Main Content Information about reserved example domains
Navigation Menu Domains, Protocols, Numbers, About
Breadcrumb Link Instructions and Guides
Further Reading IANA-managed Reserved Domains
Reference Links RFC 6761 and RFC 2606
Footer Sections Domain Names, Number Resources, Protocols, About Us
External Links PTI, ICANN, Privacy Policy, Terms of Service
Enter fullscreen mode Exit fullscreen mode

Example of the Extracted Content

OpenClaw identified the main heading:

heading "Example Domains" [level=1] [ref=f1e22]
Enter fullscreen mode Exit fullscreen mode

It also extracted the page’s main explanation:

A number of domains such as example.com and
example.org are maintained for documentation purposes.
These domains may be used as illustrative examples
in documents without prior coordination with us.
Enter fullscreen mode Exit fullscreen mode

It also identified additional links:

link "IANA-managed Reserved Domains" [ref=f1e32]

link "Special-Use Domain Names" [ref=f1e34]

link "Reserved Top Level DNS Names" [ref=f1e36]
Enter fullscreen mode Exit fullscreen mode

Notice that OpenClaw generated new element references for this page, such as f1e22, f1e32, and f1e34.

These references allow us to identify elements on the currently inspected webpage for subsequent browser actions.

What Did This Experiment Prove?

This test demonstrated that OpenClaw could:

  • Navigate from one website to another through a webpage link.
  • Identify the destination page’s main heading.
  • Extract paragraphs and other visible text.
  • Recognize navigation menus and links.
  • Identify external URLs and page references.
  • Return a structured representation of the destination webpage.

Result: Both navigation and content extraction worked successfully. OpenClaw was able to inspect the destination page rather than simply reporting that a click had occurred.

This gives us a working foundation for testing more complex browser automation tasks.

Step 8: Run our first JavaScript evaluation

Let’s start with a simple, read-only test: extract the current webpage’s title and URL.

Run:

openclaw browser evaluate --target-id t4 --fn 'return { title: document.title, url: location.href };'
Enter fullscreen mode Exit fullscreen mode

OpenClaw returned:

{
  "title": "Example Domain",
  "url": "https://example.com/"
}

JavaScript Evaluation Results

Property Expected Information Actual Result
Browser tab t4 t4
Page title Example Domain Example Domain
Current URL https://example.com/ https://example.com/
JavaScript execution Successful Successful
Evaluation target Managed browser tab Correct tab
Enter fullscreen mode Exit fullscreen mode

What Did We Learn?

This experiment demonstrated that OpenClaw can execute JavaScript directly within the managed browser.

Using document.title and location.href, we extracted two important pieces of webpage information without manually inspecting the browser.

We also encountered an interesting issue during testing: the first evaluation targetedabout:blank, and a subsequent attempt using a raw tab ID failed. Explicitly passing the suggested tab reference (t4) resolved the issue.

Experiment result: JavaScript evaluation successfully extracted the page title and URL from the correct browser tab.

Step 9: Extract Page Content Using JavaScript

Now let’s go beyond the page title and URL. We’ll test whether OpenClaw can extract the actual visible text from the webpage using JavaScript.

Run:

openclaw browser evaluate --target-id t4 --fn 'return document.body.innerText;'
Enter fullscreen mode Exit fullscreen mode

This should return the visible text from the current webpage.

OpenClaw returned the visible text from Example Domain, including its documentation notice in six languages:

  • English
  • Arabic
  • Chinese
  • French
  • Russian
  • Spanish

It also extracted the Learn more link text.

Extraction Results

Property Result

Extraction method JavaScript
JavaScript property document.body.innerText
Target tab t4
English content Extracted
Arabic content Extracted
Chinese content Extracted
French content Extracted
Russian content Extracted
Spanish content Extracted
Link text Learn more
Execution status Successful
Enter fullscreen mode Exit fullscreen mode

The actual output also contained the corresponding Arabic, Chinese, French, Russian, and Spanish text.

What Did This Experiment Prove?

This test demonstrated that OpenClaw can execute JavaScript to extract visible webpage text without relying exclusively on browser snapshots.

We have now tested two different approaches:

  • Browser snapshot: Returns structured webpage elements, including headings, paragraphs, links, and references.
  • JavaScript evaluation: Allows us to retrieve webpage information directly using browser APIs such as document.title, location.href, and document.body.innerText.

Both approaches worked successfully.

Experiment result: OpenClaw successfully extracted the visible text of a webpage using JavaScript.

Step 10: Extract All Links from a Webpage

Next, let’s test whether OpenClaw can collect all hyperlinks from a webpage and return their text and destination URLs in a structured format.

Run:

openclaw browser evaluate --target-id t4 --fn 'return Array.from(document.querySelectorAll("a")).map(a => ({ text: a.i
Enter fullscreen mode Exit fullscreen mode

Actual Output

[
  {
    "text": "Learn more",
    "href": "https://iana.org/help/example-domains"
  }
]
Enter fullscreen mode Exit fullscreen mode

Extraction Results

Property Result
Extraction method JavaScript
DOM selector document.querySelectorAll("a")
Target tab t4
Total links extracted 1
Link text Learn more
Destination URL https://iana.org/help/example-domains
Execution status Successful
Enter fullscreen mode Exit fullscreen mode

What Did This Experiment Prove?

OpenClaw can use JavaScript to locate all anchor elements on a webpage and extract their text and destination URLs.

This is useful for browser automation workflows involving:

  • Collecting website links.
  • Extracting navigation destinations.
  • Building basic link inventories.
  • Gathering structured webpage information.

Experiment result: OpenClaw successfully extracted the hyperlink information and returned it as structured JSON.

Step 11: Test Form Interaction

Now let’s move beyond reading webpages and test whether OpenClaw can interact with form fields.

We’ll use a harmless test form with dummy information, rather than submitting any real personal information.

First, let’s inspect the form interaction command syntax.

Run:

openclaw browser fill --help
Enter fullscreen mode Exit fullscreen mode

The browser fill --help output also gives us one useful finding: OpenClaw supports form filling through JSON field descriptors or a JSON file. However, we haven't tested an actual form, so we should describe this as an available capability, not a verified result.

Final experiment summary

8 practical browser tests completed or verified

# Experiment Result
1 Check browser configuration Passed
2 Start managed Chrome browser Passed
3 Verify browser status and CDP connection Passed
4 Open Example Domain Passed
5 Inspect webpage using browser snapshot Passed
6 Click a webpage link Passed
7 Inspect the destination webpage Passed
8 Execute JavaScript and extract webpage information Passed
9 Extract all hyperlinks Passed
10 Inspect form-filling capabilities Help inspected only
Enter fullscreen mode Exit fullscreen mode

Conclusion

I started this experiment with a simple question: Can OpenClaw do more than answer questions and execute commands? Can it actually control a browser, navigate websites, inspect content, and interact with webpage elements?

After working through the experiments, I was able to verify several browser automation capabilities.

OpenClaw successfully:

  • Started and controlled a managed Google Chrome browser.
  • Opened a public website.
  • Inspected webpage structure using browser snapshots.
  • Identified links and their element references.
  • Clicked a link and navigated to another website.
  • Extracted webpage titles and URLs using JavaScript.
  • Retrieved visible webpage text.
  • Collected hyperlinks and their destination URLs.

One interesting part of the experiment was troubleshooting JavaScript evaluation. My initial evaluation returned about:blank instead of the expected webpage. After inspecting the browser tabs and explicitly targeting the correct tab, the evaluation worked as expected.

This highlighted an important lesson: browser automation is not just about issuing commands. Correctly identifying the active browser tab and verifying the result of each action are equally important.

I also inspected OpenClaw’s form-filling command. It supports JSON-based field descriptors, although I did not perform a real form-filling test in this experiment.

What I Learned

The biggest takeaway is that OpenClaw provides more than basic browser navigation. Its browser interface combines page inspection, element references, interaction commands, and JavaScript evaluation.

These capabilities provide a foundation for building more advanced workflows, such as website research, information extraction, repetitive browser tasks, and form automation.

However, this was a controlled experiment using public test websites. It does not establish that every website, login flow, CAPTCHA, or complex browser workflow will work reliably.

My verdict: OpenClaw successfully demonstrated several useful browser automation capabilities in a real Chrome session. There is still more to explore, particularly multi-step workflows, form interaction, and error handling, but the initial results are promising.

Thank you so much for reading

Like | Follow | Subscribe to the newsletter.

Catch us on

Website: https://www.techlatest.net/

Newsletter: https://substack.com/@techlatestnet

Twitter: https://twitter.com/TechlatestNet

LinkedIn: https://www.linkedin.com/in/techlatest-net/

YouTube:https://www.youtube.com/@techlatest_net/

Blogs: https://medium.com/@techlatest.net

Reddit Community: https://www.reddit.com/user/techlatest_net/

Top comments (0)