惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
N
Netflix TechBlog - Medium
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
V
Visual Studio Blog
H
Help Net Security
Engineering at Meta
Engineering at Meta
Hugging Face - Blog
Hugging Face - Blog
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
博客园 - 【当耐特】
B
Blog
Stack Overflow Blog
Stack Overflow Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
博客园 - 司徒正美
博客园 - 叶小钗
Y
Y Combinator Blog
MyScale Blog
MyScale Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog
酷 壳 – CoolShell
酷 壳 – CoolShell

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat(browser): add stable tab handles and automation skil...
steipete · 2026-04-25 · via Recent Commits to openclaw:main

@@ -0,0 +1,83 @@

1+

---

2+

name: browser-automation

3+

description: Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

4+

user-invocable: false

5+

---

6+7+

# Browser Automation

8+9+

Use this skill when you need the `browser` tool for anything beyond a single page check.

10+11+

## Operating Loop

12+13+

1. Check browser state before acting:

14+

- `action="status"` for availability.

15+

- `action="profiles"` if login state or profile choice matters.

16+

- `action="tabs"` before opening a new tab if retries/timeouts may have left windows behind.

17+

2. Prefer stable tab handles:

18+

- Open important tabs with `label`, for example `label="meet"`.

19+

- Use `tabId` handles like `t1` or labels like `meet` as `targetId` in later calls.

20+

- Avoid relying on raw DevTools `targetId` unless the tool just returned it.

21+

3. Read before you click:

22+

- Use `action="snapshot"` on the intended `targetId`.

23+

- Use the same `targetId` for follow-up actions so refs stay on the same tab.

24+

- For durable Playwright refs, request `refs="aria"` when supported.

25+

4. Act narrowly:

26+

- Prefer `action="act"` with a ref from the latest snapshot.

27+

- After navigation, modal changes, or form submission, snapshot again before the next action.

28+

- Avoid blind waits. Wait for visible UI state when possible.

29+

5. Report real blockers:

30+

- If the page needs login, permission, captcha, 2FA, camera/microphone approval, or another manual step, stop and tell the user exactly what is needed.

31+

- Do not claim the browser is not logged in just because the current page shows a permission or onboarding dialog. Inspect the visible UI first.

32+33+

## Tab Hygiene

34+35+

Before creating a tab for a named task, list tabs and reuse an existing matching label or URL when it is still usable.

36+37+

Example:

38+39+

```json

40+

{ "action": "tabs" }

41+

```

42+43+

If no suitable tab exists:

44+45+

```json

46+

{ "action": "open", "url": "https://example.com", "label": "task" }

47+

```

48+49+

Then target it by label:

50+51+

```json

52+

{ "action": "snapshot", "targetId": "task", "refs": "aria" }

53+

```

54+55+

If a retry creates duplicates, close the extras by `tabId`:

56+57+

```json

58+

{ "action": "close", "targetId": "t3" }

59+

```

60+61+

## Stale Ref Recovery

62+63+

If an action fails with a missing or stale ref:

64+65+

1. Snapshot the same `targetId` again.

66+

2. Find the current visible control.

67+

3. Retry once with the new ref.

68+

4. If the UI moved to a blocker state, report the blocker instead of looping.

69+70+

## Existing User Browser

71+72+

Use `profile="user"` only when existing cookies/login matter. This attaches to the user's running Chromium-based browser.

73+74+

For `profile="user"` and other existing-session profiles, omit `timeoutMs` on `act:type`, `evaluate`, `hover`, `scrollIntoView`, `drag`, `select`, and `fill`; that driver rejects per-call timeout overrides for those actions.

75+76+

## Google Meet Notes

77+78+

When creating or joining a Meet:

79+80+

- Treat camera/microphone permission screens as progress, not login failure.

81+

- If asked whether people can hear you, click the microphone option when voice is required.

82+

- If Google asks for sign-in, 2FA, account chooser confirmation, or permission that needs user approval, report the exact manual action.

83+

- Use one labeled tab per meeting flow, for example `label="meet"`, and reuse it during retries.