browser_upload_file
Attach a file to a specific element on a web page by bypassing the native file picker. Supports multiple strategies and sources like stash, path, or base64.
Instructions
Attach a file to a target on the page. Bypasses the native OS file picker via a strategy chain (direct DOM.setFileInputFiles → file-chooser intercept → drag-drop synthesis → paste synthesis). Source can be a stashId from browser_upload_stage OR inline (path/url/dataUrl/base64). Target can be a CSS selector, accessibility ref, visible trigger element, or auto-detected from a nearby anchor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | ||
| stashId | No | ||
| path | No | ||
| url | No | ||
| dataUrl | No | ||
| base64 | No | ||
| bytes | No | Alias for `base64`. | |
| mime | No | ||
| name | No | ||
| files | No | For multi-file inputs: array of source descriptors (each like the inline fields above OR { stashId }). | |
| selector | No | ||
| ref | No | ||
| trigger | No | ||
| auto | No | ||
| strategies | No | ||
| frames | No | "all" | "top" | <frameId> | all |
| dispatchEvents | No | ||
| waitFor | No |