Skip to main content
Download files in the context of the current page.
result = await page.agent.download_files(
    "Download the latest invoice PDF",
    download_suffix=".pdf",
    download_timeout=30,
)
ParameterTypeRequiredDescription
promptstr / stringYesWhat to download.
urlstr / stringNoURL to navigate to. Defaults to current page URL.
download_suffix / downloadSuffixstr / stringNoExpected file extension.
download_timeout / downloadTimeoutfloat / numberNoDownload timeout in seconds.
max_steps_per_run / maxStepsPerRunint / numberNoMax AI steps.
timeoutfloat / numberNoMax wait time in seconds. Default: 1800.
Returns WorkflowRunResponse.