标签
🌐 Tabs
browser_tabs
管理浏览器标签页 — 列出、创建、关闭或切换它们。
🌐 Manage browser tabs — list, create, close, or switch between them.
| 参数 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
action | 字符串 | 是 | list、new、close 或 select |
url | 字符串 | 否 | new 操作的 URL |
index | 数字 | 否 | select 或 close 的标签索引 |
列出所有标签
🌐 List all tabs
→ browser_tabs { action: "list" }
Tab 0: "TodoMVC" - https://demo.playwright.dev/todomvc
Tab 1: "Example" - https://example.com
Tab 2: "Google" - https://google.com
* active: Tab 0
打开一个新标签页
🌐 Open a new tab
→ browser_tabs { action: "new", url: "https://example.com" }
→ Returns snapshot of the new tab
切换到一个标签
🌐 Switch to a tab
→ browser_tabs { action: "select", index: 1 }
→ Returns snapshot of the selected tab
关闭标签页
🌐 Close a tab
→ browser_tabs { action: "close" } // close current tab
→ browser_tabs { action: "close", index: 2 } // close specific tab
工作流程:比较两个页面
🌐 Workflow: comparing two pages
You: Open staging and production, compare the headers.
→ browser_navigate { url: "https://staging.example.com" }
→ browser_snapshot // snapshot of staging
→ browser_tabs { action: "new", url: "https://example.com" }
→ browser_snapshot // snapshot of production
// LLM compares the two snapshots