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
name
stringThe name of the cookie.
value
stringThe value of the cookie.
domain
stringThe domain of the cookie.
path
stringThe path of the cookie.
expiry
DateTime?The expiration date of the cookie.
isSecure
boolisHttpOnly
bool
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.
Properties
IsHttpOnly
Gets a value indicating whether the cookie is an HTTP-only cookie.
public override bool IsHttpOnly { get; }
Property Value
Secure
Gets a value indicating whether the cookie is secure.
public override bool Secure { get; }
Property Value
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.