Table of Contents

Class PermissionDescriptor

Namespace
WebDriverBiDi.Permissions
Assembly
WebDriverBiDi.dll

Represents a descriptor for a browser permission.

public class PermissionDescriptor
Inheritance
PermissionDescriptor
Inherited Members

Constructors

PermissionDescriptor(string)

Initializes a new instance of the PermissionDescriptor class.

public PermissionDescriptor(string name)

Parameters

name string

The name of the permission.

Properties

AdditionalData

Gets the dictionary containing additional descriptor members to send for the permission.

[JsonExtensionData]
public Dictionary<string, object?> AdditionalData { get; }

Property Value

Dictionary<string, object>

Remarks

The Permissions specification converts the descriptor to the WebIDL descriptor type of the named permission, and for several permissions that type defines members beyond name — for example, the midi permission's sysex member, or the camera permission's panTiltZoom member. Entries added to this dictionary are serialized as additional members of the descriptor object.

An entry may not reuse the name of a property this type already serializes; doing so would write that name twice in the same JSON object, and a JSON object with a duplicate name has no defined meaning. Sending a command that contains such an entry throws WebDriverBiDiSerializationException rather than emitting the ambiguous payload. Set the typed property instead.

Name

Gets or sets the name of the permission.

[JsonPropertyName("name")]
public string Name { get; set; }

Property Value

string