Skip to main content
export type Trigger = string | Locator | ((page: Page) => Promise<void>);
All download functions in the helpers module accept Trigger for consistency. The trigger method determines how the download operation is initiated.
A union type representing different methods to trigger file downloads in web automation. This type alias standardizes how download operations can be initiated, providing multiple approaches to suit different automation scenarios.

Examples

import { downloadFile } from "@intuned/browser";
export default async function handler(params, page, context){
// Direct download from URL
const download = await downloadFile({
  page,
  trigger: "https://example.com/report.pdf"
});
}