Skip to main content
Trigger = str | Locator | Callable[[Page], None]
Union type for different ways to trigger file downloads 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.

Type Information

str
type
Direct URL string to download from
Locator
type
Playwright Locator object pointing to a clickable download element
Callable[[Page], None]
type
Custom function that takes a Page and triggers the download

Examples

from intuned_browser import Attachment
async def automation(page, params, **_kwargs):
# Direct download from URL
from intuned_browser import download_file
download = await download_file(page, "https://intuned-docs-public-images.s3.amazonaws.com/32UP83A_ENG_US.pdf")
All download functions in the helpers module accept Trigger for consistency. The trigger method determines how the download operation is initiated.