Skip to main content
A union type representing different methods to trigger file downloads in web automation. This type standardizes how download operations can be initiated, providing multiple approaches for different automation scenarios. Type variants:
  • string: Direct URL string to download from
  • Locator: Playwright Locator object pointing to a clickable download element
  • (page: Page) => Promise<void>: Custom async function that takes a Page and triggers the download

Examples