Upload file
upload_fileAttach a local file to a file input without triggering the OS file-picker dialog, avoiding automation halts on sites with hidden upload controls.
Instructions
Attach a local file to a file input on the page.
Sets the input's files directly over CDP, so no OS file-picker dialog ever opens — clicking an upload button normally would open one, and that blocks every further tool call until a human dismisses it.
Many sites hide the real behind a styled button or drop zone. It is still in the snapshot; if you cannot spot it, locate it with query_selector("input[type=file]").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | uid of the <input type="file"> element, from the most recent take_snapshot. It must be the file input itself, not the styled button or drop zone layered over it. | |
| file_path | Yes | Absolute path to a local file on the machine running this server. | |
| include_snapshot | No | Append a fresh page snapshot to the response. Worth it when this action changes the page and take_snapshot would be your next call anyway — it saves a round trip, at the cost of a much larger response. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |