File upload
Use the File upload step to hand a file to the next native file picker that opens on the page.
Setup
- Add a File upload step with a source (see Sources below).
- (Optional) Set File name to rename the file as it’s presented to the page. Defaults to the name in the URL or local path.
- Add a Click step on the button or element that opens the picker.
Sources
Any publicly accessible direct file URL. Must resolve to the file itself, not
an HTML wrapper or redirect.
Reference a file captured by an earlier download
step via its saved environment variable.
Absolute path, or path relative to
momentic.config.yaml. CLI only; not
available in cloud runs.Limits
- One file per step.
- Max file size: 50 MB.
File download
Momentic captures a download by attaching to the Click step that triggers it, rather than a separate step type.
Setup
- Add a Click step on the button or link that triggers the download.
- Enable Wait for download on that step. Momentic waits for the download to complete before moving on.
- (Optional) Set Save to environment variable (e.g.
DOWNLOADED_FILE) to capture the resulting file URL. Later steps can reference it, including a File upload step viafile://{{ env.DOWNLOADED_FILE }}.
Limits
- One file per Click step.
- Download timeout: 10 seconds.
- Max file size: 50 MB.
- Downloaded files are deleted at the end of the session, or after 15 minutes, whichever comes first.
- Direct file inspection (reading contents, checking format, verifying the filename) is not supported.
Round-trip: download then upload
A common pattern is downloading a file from one part of the app and uploading it somewhere else in the same test.- Click (download button) with Wait for download on and Save to
environment variable set to
DOWNLOADED_FILE. - File upload with source
file://{{ env.DOWNLOADED_FILE }}. - Click (the button that opens the next file picker).