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 installation and initialization of Chromium, system dependencies, Chinese fonts, and the CDP launcher script in a fresh openclaw environment — no root required. Triggered when the user says "initialize test environment", "install browser tools", "setup browser", or when deploying a test agent to a new machine for the first time.

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

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

4 installs

Attach to the user's OWN already-logged-in system browser over the Chrome DevTools Protocol (CDP) with Playwright, so automation reuses their existing sessio...

6 installs

Give an AI agent its own real browser over MCP tool calls - launch, navigate, click, fill, screenshot, extract text, run JS - with a kernel-level real-device fingerprint and a persistent profile, so the session stays logged in between runs and pages see one coherent device instead of a headless.

基于微软 Playwright CLI 的浏览器自动化技能。用于 Web 测试、页面交互、自动化工作流。当用户提到 playwright、browser automation、Web 测试、E2E 测试时触发。

3 installs

浏览器自动化 CLI(Playwright 版,纯 Node.js 实现)。除常规自动化(打开网页/截图/点击/填表/翻页)外,提供三类能力:(1) 会话凭证读写原语 —— `cookies` / `storage` 命令可**无需代码执行**即列出/导出/导入/清除/设置 cookie 与 localStorage,直接提取或注入登录态与会话令牌(此路径独立于代码执行;自 v1.3.2 起 `PW_BROWSER_SAFE_MODE=1` 会将其与代码执行一并禁用);(2) `eval` 在页面上下文执行任意 JavaScript(可读 cookie/存储、发起带凭证请求);(3) `run

1 installs1 stars

Run a browser-driving agent on a Linux VM — Xvfb, Chromium launch traps, egress cost tiers. Use when headless fails on your VM or Chromium dies on launch. St...