Table of Contents

Class SetDownloadBehaviorCommandSettings

Namespace
OpenQA.Selenium.DevTools.V148.Browser
Assembly
Selenium.WebDriver.dll

Set the behavior when downloading a file.

public sealed class SetDownloadBehaviorCommandSettings : ICommand
Inheritance
SetDownloadBehaviorCommandSettings
Implements
Inherited Members

Properties

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.

[JsonPropertyName("behavior")]
public string Behavior { get; set; }

Property Value

string

BrowserContextId

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

[JsonPropertyName("browserContextId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? BrowserContextId { get; set; }

Property Value

string

CommandName

Gets the name of the command.

[JsonIgnore]
public string CommandName { get; }

Property Value

string

DownloadPath

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

[JsonPropertyName("downloadPath")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? DownloadPath { get; set; }

Property Value

string

EventsEnabled

Whether to emit download events (defaults to false).

[JsonPropertyName("eventsEnabled")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public bool? EventsEnabled { get; set; }

Property Value

bool?