Skip to main content
Momentic can upload files into native file pickers and capture files that the page downloads. Both work through dedicated step options rather than a separate step type.

File upload

Use the File upload step to hand a file to the next native file picker that opens on the page.
The step installs a listener on the next file picker. It must run before the picker is triggered, otherwise nothing is uploaded.
File upload step

Setup

  1. Add a File upload step with a source (see Sources below).
  2. (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.
  3. Add a Click step on the button or element that opens the picker.

Sources

Remote URL
http:// or https://
Any publicly accessible direct file URL. Must resolve to the file itself, not an HTML wrapper or redirect.
https://raw.githubusercontent.com/momentic-ai/momentic/main/README.md
Previously downloaded file
file://<key>
Reference a file captured by an earlier download step via its saved environment variable.
file://{{ env.DOWNLOADED_FILE }}
Local file
path
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.
File download step

Setup

  1. Add a Click step on the button or link that triggers the download.
  2. Enable Wait for download on that step. Momentic waits for the download to complete before moving on.
  3. (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 via file://{{ 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.
  1. Click (download button) with Wait for download on and Save to environment variable set to DOWNLOADED_FILE.
  2. File upload with source file://{{ env.DOWNLOADED_FILE }}.
  3. Click (the button that opens the next file picker).