setDownloadBehavior

suspend fun setDownloadBehavior(args: Browser.SetDownloadBehaviorParameter, mode: CommandMode = CommandMode.DEFAULT)

Set the behavior when downloading a file.


suspend fun setDownloadBehavior(behavior: String, browserContextId: String? = null, downloadPath: String? = null, eventsEnabled: Boolean? = null)

Set the behavior when downloading a file.

Parameters

behavior

Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their download guids.

browserContextId

BrowserContext to set download behavior. When omitted, default browser context is used.

downloadPath

The default path to save downloaded files to. This is required if behavior is set to 'allow' or 'allowAndName'.

eventsEnabled

Whether to emit download events (defaults to false).