pilot_file_upload
Upload files to a file input element on a page by providing the element reference and absolute file paths. Use for attaching documents, images, or other files.
Instructions
Upload one or more files to a file input element on the page. Use when the user wants to attach files, upload images, or submit documents through a file input field.
Parameters:
ref: The file input element reference from snapshot (e.g., "@e8") or a CSS selector pointing to an
paths: Array of absolute file paths to upload (e.g., ["/home/user/photo.png", "/home/user/doc.pdf"])
Returns: Confirmation with file names and sizes uploaded.
Errors:
"File not found": One or more paths do not exist on the filesystem. Verify the file paths.
"Element not found": The ref is stale or does not point to a file input. Run pilot_snapshot.
"Not a file input": The element is not an .
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | File input element ref or CSS selector | |
| paths | Yes | File paths to upload |