edge-browser-automation
Skill0 starsChanged 3 months agoMITView on GitHub
Windows Edge 浏览器自动化三件套:Playwright无头搜索抓取、mcp-chrome扩展桥接、computer_use桌面操控。郑鑫环境专用(无Chrome,仅Edge)。
- Installs packages
In this repository219 other files it gives its agents.
- agent-doctrineSkill
- agent-evaluation-frameworkSkill
- agent-visualization-flintSkill
- hermes-agentSkill
- bailian-cliSkill
- computer-useSkill
- jupyter-live-kernelSkill
- backup-strategiesSkill
- browser-automationSkill
- chinese-ai-free-apiSkill
- cicd-pipeline-templatesSkill
- copybaraSkill
- devops-toolkitSkill
- email-deliverabilitySkill
- monitoring-observabilitySkill
- obsidian-maintenanceSkill
- obsidian-troubleshootingSkill
- openclaw-windowsSkill
- openclaw-workerSkill
- webhook-subscriptionsSkill
- windows-dev-environmentSkill
- windows-masterSkill
- zero-downtime-deploySkill
- codebase-inspectionSkill
- github-workflowSkill
- adaptive-communicationSkill
- agent-cost-dashboardSkill
- agent-evolutionSkill
- agent-governanceSkill
- agent-osSkill
- context-efficient-toolsSkill
- context-loss-awarenessSkill
- creative-synthesisSkill
- hermes-desktop-pluginsSkill
- emotional-intelligenceSkill
- graph-engineering-workflowSkill
- hermes-maintenanceSkill
- hermes-voiceSkill
- hermes-hygieneSkill
- identity-coreSkill
- income-loopSkill
- master-synthesisSkill
- meta-cognitionSkill
- reasoning-engineSkill
- self-preservationSkill
- teaching-abilitySkill
- temporal-awarenessSkill
- hermes-themesSkill
- thinking-visualizationSkill
- user-modelingSkill
- voice-full-restoreSkill
- knowledge-graph-traversalSkill
- mcp-browser-canvasSkill
- free-api-gatewaySkill
- native-mcpSkill
- web-reverse-apiSkill
- ai-edaSkill
- huggingface-hubSkill
- industrial-ai-siemens-mcpSkill
- industrial-ai-unifiedSkill
- The first 60 shown.
The file
Files
Edge 浏览器自动化
郑鑫环境无 Chrome,仅 Edge。三种浏览器操控方案已配齐。
方案速查
| 方案 | 命令/工具 | 用途 |
| Playwright 无头 | python D:/Hermes/scripts/browser_agent.py "搜索词" | 百度搜索、网页抓取、截图 |
| mcp-chrome 扩展 | mcp_chrome_* 工具(27个) | 操控已登录Edge浏览器 |
| computer_use | computer_use(action=...) | 桌面GUI点击打字 |
1. Playwright + Edge 无头模式
文件:D:/Hermes/scripts/browser_agent.py
用法:
# 百度搜索
python D:/Hermes/scripts/browser_agent.py "搜索关键词"
# 访问URL取内容
python D:/Hermes/scripts/browser_agent.py --url https://example.com
# 截图
python D:/Hermes/scripts/browser_agent.py --screenshot https://example.com依赖:playwright(已装在 Hermes venv),Edge 已装系统无需额外浏览器。
2. mcp-chrome-bridge
npm 全局安装:mcp-chrome-bridge v1.0.31
扩展 ID:hbdgbgagpkpjffpklnamcljpakneikee
扩展路径:D:/sofeware/cache/mcp-chrome/extension_raw/(手动从损坏zip提取)
桥接端口:127.0.0.1:12306
故障排查
扩展 zip 损坏无法解压:
- 用 Python 手动解析 ZIP Local File Header:
# PK\x03\x04 头 → 解析 name_len/extra_len/comp_size → 提取文件数据 → zlib.decompress- 提取到
D:/sofeware/cache/mcp-chrome/extension_raw/
Edge 原生消息注册:
mcp-chrome-bridge register --browser chromium --force
# 手动复制 manifest 到 Edge 路径
cp %APPDATA%/Chromium/NativeMessagingHosts/com.chromemcp.nativehost.json %APPDATA%/Microsoft/Edge/NativeMessagingHosts/
# 注册表
reg add "HKCU\Software\Microsoft\Edge\NativeMessagingHosts\com.chromemcp.nativehost" /ve /t REG_SZ /d "...json路径" /fHermes 连不上 chrome MCP:
- 确认桥接运行:
curl http://127.0.0.1:12306/ping→ pong - 确认扩展在 Edge 已启用:
edge://extensions - 在 Hermes 里
/reload-mcp - 如果重连失败(500错误),先 kill 所有 node 进程再重开桥接
pydantic 版本冲突导致 hermes mcp 命令失败:
pydantic 2.13.4 → pydantic-core==2.46.4(不是 2.47.0,不是 2.41.5)
pip install -i https://mirrors.cloud.tencent.com/pypi/simple pydantic-core==2.46.4 --no-deps3. computer_use (cua-driver)
背景桌面操控,不抢鼠标焦点。当前不太稳定(截图有时返回空),备选方案。
注意事项
- Edge + cua-driver 文本输入限制:Edge 窗口类
Chrome_WidgetWin_1拒绝 background 模式的type_text(返回code: background_unavailable),foreground 模式在无 UIAccess 的 cua-driver 上也会因SetForegroundWindow锁被 Windows 拦截(Foreground swap rejected by Windows)。不要用 computer_use 在 Edge 中输入文字,改用 Playwrightpage.fill()或 Playwright non-headless(headless=False)让用户手动输入。 - 国内网络:Google 服务被墙,Chrome商店扩展无法直接下载
- Edge 路径:
C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe - Playwright channel 参数:
channel="msedge" - Edge 支持 Chrome 扩展,但需手动加载解压文件夹而非 crx
- computer_use 只能抓桌面/任务栏,无法截取浏览器窗口内部内容(mcp-chrome 扩展未连接时无替代方案)
- Edge DevTools 中文标签对应:元素/Elements → 控制台/Console → 源代码/Sources → 网络/Network →
>>展开后 → 应用程序/Application(Cookies 在这里) - 抓网页 sessionid 用于逆向 API:登录目标网站 → F12 → 应用程序 → 左侧 Cookies → 选域名 → 右边表格搜
sessionid→ 复制"值"列(不能用搜索框时直接找) - 抓 API 请求格式:F12 → 网络 → 清空 → 网页上执行操作 → 搜索框输入域名过滤 → 找 POST XHR → 右键"复制为 cURL (bash)"
- cookie 值不出现:说明还没登录该网站,先打开目标网页登录后再回 DevTools 刷新
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

