safari_upload_file
Upload files directly to web forms using JavaScript DataTransfer without opening file dialogs or interacting with UI elements. Specify a CSS selector and file path to automate file uploads in Safari browser automation.
Instructions
Upload a file to a element via JavaScript DataTransfer — NO file dialog, NO UI interaction. IMPORTANT: Do NOT click the file input before calling this tool — just provide the selector and file path. If a file dialog is already open, this tool will close it first. NOTE: 'verified 0 files' may appear even on success if the site uses a custom upload handler — check visually with safari_snapshot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector of the file input | |
| filePath | Yes | Absolute path to the file to upload |