Class ReturnedCookie
Represents a cookie returned to the driver by the browser.
public class ReturnedCookie : Cookie
- Inheritance
-
ReturnedCookie
- Inherited Members
Constructors
ReturnedCookie(string, string, string?, string?, DateTime?, bool, bool)
Initializes a new instance of the ReturnedCookie class with a specific name, value, domain, path and expiration date.
public ReturnedCookie(string name, string value, string? domain, string? path, DateTime? expiry, bool isSecure, bool isHttpOnly)
Parameters
namestringThe name of the cookie.
valuestringThe value of the cookie.
domainstringThe domain of the cookie.
pathstringThe path of the cookie.
expiryDateTime?The expiration date of the cookie.
isSecureboolisHttpOnlybool
Exceptions
- ArgumentException
If the name is null or an empty string, or if it contains a semi-colon.
- ArgumentNullException
If the value or currentUrl is null.
ReturnedCookie(string, string, string?, string?, DateTime?, bool, bool, string?)
Initializes a new instance of the ReturnedCookie class with a specific name, value, domain, path and expiration date.
public ReturnedCookie(string name, string value, string? domain, string? path, DateTime? expiry, bool isSecure, bool isHttpOnly, string? sameSite)
Parameters
namestringThe name of the cookie.
valuestringThe value of the cookie.
domainstringThe domain of the cookie.
pathstringThe path of the cookie.
expiryDateTime?The expiration date of the cookie.
isSecureboolisHttpOnlyboolsameSitestringThe SameSite value of cookie.
Exceptions
- ArgumentException
If the name is null or an empty string, or if it contains a semi-colon.
- ArgumentNullException
If the value or currentUrl is null.
Methods
ToString()
Creates and returns a string representation of the current cookie.
public override string ToString()
Returns
- string
A string representation of the current cookie.