use-agent-browser-with-input-file
Upload local files through ordinary, hidden, dynamically created, detached, multiple, or native-backed file inputs with agent-browser in web and Electron applications. Use when testing file selection, drag-or-choose flows, framework file-dialog composables, or post-upload application behavior.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- use-agent-browser-with-input-file
- description
- Upload local files through ordinary, hidden, dynamically created, detached, multiple, or native-backed file inputs with agent-browser in web and Electron applications. Use when testing file selection, drag-or-choose flows, framework file-dialog composables, or post-upload application behavior.
02 资源文件 5
- 参考文档agents/openai.yaml240 B
- 参考文档references/attached-input.md1.3 KB
- 参考文档references/detached-input.md2.3 KB
- 参考文档references/native-file-chooser.md1.3 KB
- 参考文档references/verify-upload.md1.2 KB
03 SKILL.md 正文
Use Agent Browser with an Input File
Invoke $agent-browser first and run agent-browser skills get agent-browser --full before issuing browser commands. For Electron, also invoke $agent-browser-electron and attach to the intended renderer target.
Resolve the input file to an absolute path and verify that it exists. Then inspect the DOM before choosing an upload method:
- For an attached
input[type="file"], including a visually hidden input, read references/attached-input.md. - For an input created on demand or kept detached from the DOM by application code, read references/detached-input.md.
- For a native file chooser or a flow where no HTML input can be addressed, read references/native-file-chooser.md.
- For evidence requirements after the file is assigned, read references/verify-upload.md.
Workflow
- Open the target route and inspect
snapshot -iand the DOM around the upload control. - Determine whether the input already exists, appears after interaction, remains detached, or delegates to a native picker.
- Apply the matching reference without changing application source code.
- Re-snapshot after each interaction because element refs can become stale.
- Verify application-specific processing, persistence, and final output separately.
- Inspect browser errors and relevant console output.
- Restore any temporary browser-session instrumentation and close the session.
Keep the same --session and, for Electron, --cdp <port> options on every command. When Electron exposes several targets, use the discovery process from $agent-browser-electron and confirm the active target URL before uploading.
Handoff to Vishot
Use Agent Browser to discover inputs, diagnose selectors, and prove the interaction. Once the flow is stable, encode it in a Playwright-backed Vishot scenario with $use-vishot-with-input-file when deterministic visual evidence is required.
Do not treat a successful upload command as completion. File assignment, application import, persistence, and rendering are distinct checkpoints.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.