setDownloadBehavior method

  1. @Deprecated('This command is deprecated')
Future<void> setDownloadBehavior(
  1. @Enum(['deny', 'allow', 'default']) String behavior,
  2. {String? downloadPath}
)

Set the behavior when downloading a file. behavior Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). downloadPath The default path to save downloaded files to. This is required if behavior is set to 'allow'

Implementation

@Deprecated('This command is deprecated')
Future<void> setDownloadBehavior(
    @Enum(['deny', 'allow', 'default']) String behavior,
    {String? downloadPath}) async {
  assert(const ['deny', 'allow', 'default'].contains(behavior));
  await _client.send('Page.setDownloadBehavior', {
    'behavior': behavior,
    if (downloadPath != null) 'downloadPath': downloadPath,
  });
}