Table of Contents

Class SetDownloadBehaviorCommandParameters

Namespace
WebDriverBiDi.Browser
Assembly
WebDriverBiDi.dll

Provides parameters for the browser.setDownloadBehavior command.

public class SetDownloadBehaviorCommandParameters : CommandParameters<SetDownloadBehaviorCommandResult>
Inheritance
SetDownloadBehaviorCommandParameters
Inherited Members

Constructors

SetDownloadBehaviorCommandParameters()

Initializes a new instance of the SetDownloadBehaviorCommandParameters class.

public SetDownloadBehaviorCommandParameters()

Properties

DownloadBehavior

Gets or sets the download behavior for the browser. Setting the value to null resets the download behavior to the default.

[JsonPropertyName("downloadBehavior")]
public DownloadBehavior? DownloadBehavior { get; set; }

Property Value

DownloadBehavior

MethodName

Gets the method name of the command.

[JsonIgnore]
public override string MethodName { get; }

Property Value

string

ResetDownloadBehavior

Gets a pre-initialized instance of SetDownloadBehaviorCommandParameters with the DownloadBehavior property set to null to clear any existing download behavior override. Returns a new instance on each access to allow for modification of the properties without affecting other uses. Functionally equivalent to using the parameterless constructor, but provided as a named property to make the intent of clearing the override more explicit in code that uses this property.

public static SetDownloadBehaviorCommandParameters ResetDownloadBehavior { get; }

Property Value

SetDownloadBehaviorCommandParameters

UserContexts

Gets the list of user contexts for which to set the download behavior.

[JsonIgnore]
public List<string> UserContexts { get; }

Property Value

List<string>

Remarks

The protocol requires this property, when present, to contain at least one entry. An empty list therefore means "not specified": the property is omitted from the JSON payload entirely, and an empty array is never sent. Add entries to the list to scope the command.