Class CookieFilter
- Namespace
- WebDriverBiDi.Storage
- Assembly
- WebDriverBiDi.dll
Object containing data for querying for existing cookies.
public class CookieFilter
- Inheritance
-
CookieFilter
- Inherited Members
Constructors
CookieFilter()
Initializes a new instance of the CookieFilter class.
public CookieFilter()
Properties
AdditionalData
Gets the dictionary containing extra data to use in querying for cookies.
[JsonExtensionData]
public Dictionary<string, object?> AdditionalData { get; }
Property Value
Remarks
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.
Domain
Gets or sets the domain to use in querying for cookies.
[JsonPropertyName("domain")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Domain { get; set; }
Property Value
Expires
Gets or sets the expiration time of the cookie for querying cookies.
[JsonIgnore]
public DateTime? Expires { get; set; }
Property Value
Remarks
The protocol expresses the time as whole seconds since the Unix epoch, so a value set here is truncated to the second, and a value that is not UTC is converted to UTC first; setting a value before the epoch throws. MaxValue, the usual way to say "never expires", is therefore stored as the last whole second of 9999, and reads back as that second. The value read is always UTC.
Exceptions
- ArgumentOutOfRangeException
Thrown when the value is before the Unix epoch.
HttpOnly
Gets or sets a value indicating whether the cookie is only available via HTTP headers to use in querying for cookies.
[JsonPropertyName("httpOnly")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? HttpOnly { get; set; }
Property Value
- bool?
Name
Gets or sets the name to use in querying for cookies.
[JsonPropertyName("name")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Name { get; set; }
Property Value
Path
Gets or sets the path to use in querying for cookies.
[JsonPropertyName("path")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Path { get; set; }
Property Value
SameSite
Gets or sets the SameSite policy of the cookie to use in querying for cookies.
[JsonPropertyName("sameSite")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public CookieSameSiteValue? SameSite { get; set; }
Property Value
Secure
Gets or sets a value indicating whether the cookie is secure, delivered via an encrypted connection like HTTPS to use in querying for cookies.
[JsonPropertyName("secure")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Secure { get; set; }
Property Value
- bool?
Size
Gets or sets the byte length of the cookie when serialized in an HTTP cookie header to use in querying for cookies.
[JsonPropertyName("size")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ulong? Size { get; set; }
Property Value
Value
Gets or sets the value to use in querying for cookies.
[JsonPropertyName("value")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public BytesValue? Value { get; set; }