Browser

Testagent Browser Setup

Try it

One-time installation and initialization of Chromium, system dependencies, Chinese fonts, and the CDP launcher script in a fresh openclaw environment — no ro...

What it does

One-time environment initialization, run on a fresh openclaw container. No root required.

The skill document

Browser Setup

One-time environment initialization, run on a fresh openclaw container. No root required.

Notes

The openclaw environment ships with Chromium pre-installed by default; setup.sh prefers it and only falls back to downloading via Playwright if it's not found.

The primary path for screenshots and browser actions is: Chrome + direct CDP. setup.sh creates a ~/.local/bin/chrome-cdp launcher script.

mcp doctor --probe gives false positives. It returning ok only means the MCP server process started — not that Chromium can actually run. The only reliable check is: playwright__browser_navigate actually returning page content.

Execution order

Step 1: Run the core setup script

bash scripts/setup.sh

The script does three things:

  1. Chromium detection: prefers the system-preinstalled Chromium, falling back to a Playwright download if not found
  2. chrome-cdp launcher script: ~/.local/bin/chrome-cdp, wrapping the --headless=new --no-sandbox --remote-allow-origins=* flags
  3. Chinese fonts: downloads WenQuanYi Micro Hei from GitHub into ~/.local/share/fonts/

Step 2: Try configuring the built-in browser (optional, often ineffective)

Edit ~/.openclaw/openclaw.json (config.patch refuses to modify protected paths, so the file must be written by hand):

{
  "browser": {
    "noSandbox": true,
    "ssrfPolicy": {
      "allowedHostnames": [
        "your target product domain (e.g. app.example.com)",
        "the corresponding login domain (e.g. xxx.us.auth0.com)"
      ]
    }
  }
}

After editing: browser stop → gateway restart → wait 15s → browser start

⚠️ The SSRF allowlist often doesn't take effect (the gateway has a runtime cache and doesn't always pick up the file). If browser navigate still reports blocked by policy, immediately abandon the built-in browser and switch to direct CDP (see TOOLS.md) rather than continuing to restart-and-retry.

Step 4: Initialize TOOLS.md

cp "$(dirname "$0")/../TOOLS.md" ./TOOLS.md

Step 6 (optional): Install browser-use

bash scripts/setup-optional.sh

Step 7: Smoke test

# Start Chrome CDP
chrome-cdp &
sleep 2

# Verify CDP is reachable
curl -s http://localhost:9223/json | python3 -m json.tool | head -20

# Verify with a screenshot (see the CDP screenshot flow in REFERENCE.md)

Acceptance criteria: CDP /json returns a target list, and Chinese text in screenshots renders cleanly with no mojibake.

Related skills

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván559 installs18 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván855 installs69 stars

More from wangyin717

Browse all skills

Query and operate on Tencent Coding DevOps platform (e.coding.net) data — iterations, issues (requirements/defects/tasks), and team members — including creat...

by wangyin7174 installs

Functional testing of web products using Playwright MCP, browser-use CLI, and the openclaw built-in browser, following a full testing SOP — planning, executi...

by wangyin7174 installs