| 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. |
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:
Workflow
- Open the target route and inspect
snapshot -i and 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.