upload_file
Attach a local file to a browser file input without opening the OS file picker; target hidden inputs and submit after upload.
Instructions
Attach a local file to a file input () without opening the operating system's file picker. Waits for the input to exist; it may be hidden, as styled upload buttons often hide the real input, so target the input itself. The file must exist on the machine running this server. After attaching, click the page's upload or submit button if it has one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the file on the machine running this server, e.g. '/home/me/report.pdf' or 'C:/Users/me/report.pdf'. | |
| selector | Yes | How to find the element, e.g. { by: 'css', value: '#login-button' } or { by: 'id', value: 'user-name' }. Prefer id, name, or a short CSS selector. | |
| timeoutMs | No | How long to wait for the file input to exist, in milliseconds (default 10000). |