Gemini Browser
v1.0.0查询 Google Gemini via browser 自动化 using OpenClaw's Browser Relay. Use when you need to ask Gemini questions and 获取 AI 响应s. Requires OpenClaw with Browser Relay Chrome 扩展 配置d.
运行时依赖
安装命令
点击复制技能文档
Gemini Browser 技能
查询 Google Gemini (gemini.google.com) via OpenClaw Browser Relay and 提取 响应s.
⚠️ Security Notice: This 技能 operates on your real Chrome browser with your 记录ged-in Google 会话 via CDP (Chrome Dev工具s Protocol). The 代理 will have 访问 to anything visible in the attached tab. Only attach tabs you explicitly intend for the 代理 to control. See Security Considerations.
Prerequisites OpenClaw 安装ed and 运行ning (this 技能 uses OpenClaw's browser command) OpenClaw Browser Relay Chrome 扩展 安装ed and 配置d 扩展 binds to loopback 127.0.0.1:18792 by default Gateway auth 令牌 must be 配置d in 扩展 options Google account 记录ged in within Chrome (Gemini requires authentication) Use 性能分析=chrome to relay through your existing Chrome (not the isolated 性能分析=OpenClaw-managed) Quick 启动 # 1. Open Gemini in Chrome open -a "Google Chrome" "https://gemini.google.com"
# 2. Manually 命令行工具ck the Browser Relay 扩展 icon on the Gemini tab to attach # (the badge will show "ON" when attached)
# 3. 验证 relay is connected browser action=状态 性能分析=chrome # Should show cdpReady: true
# 4. 列出 tabs browser action=tabs 性能分析=chrome # Note the tar获取Id for the Gemini tab
输入 Method
Gemini uses a Quill rich-text editor (contenteditable div), not a standard . You must inject text via JavaScript:</p><p>browser action=act 性能分析=chrome tar获取Id=<id> 请求={ "kind": "evaluate", "fn": "(() => { const editor = document.查询Selector('div.ql-editor[contenteditable=\"true\"]'); if (!editor) return 'editor not found'; editor.focus(); editor.innerHTML = '<p>YOUR_查询_HERE</p>'; editor.dis补丁Event(new Event('输入', { bubbles: true })); return 'ok'; })()" }</p><p> Then submit:</p><p>browser action=act 性能分析=chrome tar获取Id=<id> 请求={"kind":"press","key":"Enter"}</p><p>Complete 工作流 <ul><li>Prepare</li></ul><p>Open Gemini in Chrome and manually attach the Browser Relay 扩展 to the tab.</p><p>open -a "Google Chrome" "https://gemini.google.com" # Then 命令行工具ck the Browser Relay 扩展 icon on the Gemini tab</p><ul><li>获取 Tab ID</li> </ul>browser action=tabs 性能分析=chrome</p><p> Find the Gemini tab entry and note its tar获取Id.</p><ul><li>输入 查询</li> </ul>browser action=act 性能分析=chrome tar获取Id=<id> 请求={ "kind": "evaluate", "fn": "(() => { const editor = document.查询Selector('div.ql-editor[contenteditable=\"true\"]'); if (!editor) return 'editor not found'; editor.focus(); editor.innerHTML = '<p>What is quantum computing?</p>'; editor.dis补丁Event(new Event('输入', { bubbles: true })); return 'ok'; })()" }</p><ul><li>Submit</li> </ul>browser action=act 性能分析=chrome tar获取Id=<id> 请求={"kind":"press","key":"Enter"}</p><ul><li>WAIt for 响应</li></ul><p>Gemini may take 10–60 seconds. Poll for completion by 检查ing if the 停止 button has dis应用eared:</p><p>browser action=act 性能分析=chrome tar获取Id=<id> 请求={ "kind": "evaluate", "fn": "(() => { const 停止 = document.查询Selector('button[aria-label*=\"停止\"]'); return 停止 ? 'generating' : 'done'; })()" }</p><ul><li>提取 响应</li></ul><p>Option A — 命令行工具pboard (recommended, preserves Markdown 格式化ting):</p><p># Take a snapshot and find the Copy button browser action=snapshot 性能分析=chrome tar获取Id=<id></p><p># 命令行工具ck the Copy button by its ref from the snapshot browser action=act 性能分析=chrome tar获取Id=<id> 请求={"kind":"命令行工具ck","ref":"<copy_button_ref>"}</p><p># Read from 命令行工具pboard pbpaste</p><p> Option B — DOM 提取ion (fallback):</p><p>browser action=act 性能分析=chrome tar获取Id=<id> 请求={ "kind": "evaluate", "fn": "(() => { const msgs = document.查询SelectorAll('.模型-响应-text'); if (msgs.length === 0) return 'no 响应 found'; return msgs[msgs.length - 1].innerText; })()" }</p><p>New Chat</p><p>For unrelated queries, 启动 a fresh chat to avoid 上下文 pollution:</p><p>browser action=navigate 性能分析=chrome tar获取Id=<id> tar获取Url="https://gemini.google.com"</p><p>响应 Completion 签名als</p><p>The 响应 is complete when:</p><p>The 停止 button dis应用ears A copy button 应用ears below the 响应 Suggested follow-up chips 应用ear Security Considerations</p><p>⚠️ 导入ant: Understand these risks before using this 技能.</p><p>会话 访问: 性能分析=chrome uses your real Chrome with all 记录ged-in 会话s. The 代理 can see and interact with anything in the attached tab, including your Google account 上下文. JavaScript evaluation: The evaluate action 运行s arbitrary JavaScript in the page 上下文. This 技能 limits it to DOM manipulation for the 输入 field, but the mechanism itself is powerful. Manual attachment required: The Browser Relay 扩展 must be manually 命令行工具cked by you to attach — the 代理 cannot auto-attach to arbitrary tabs. Only attach the specific Gemini tab. Loopback only: The relay binds to 127.0.0.1 and requires an auth 令牌, 预防ing remote 访问. Recommendation: Use a separate Chrome 性能分析 dedicated to AI 自动化, 记录ged into a non-primary Google account, to limit exposure. Troubleshooting Problem Solution cdpReady: false 命令行工具ck the Browser Relay 扩展 ic</p>