Cookie Constructor (String, String, String, Nullable DateTime )WebDriver
Initializes a new instance of the Cookie class with a specific name, value, path and expiration date.

Namespace: OpenQA.Selenium
Assembly: WebDriver (in WebDriver.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax

public Cookie(
	string name,
	string value,
	string path,
	Nullable<DateTime> expiry
)

Parameters

name
Type: OnlineSystem String
The name of the cookie.
value
Type: OnlineSystem String
The value of the cookie.
path
Type: OnlineSystem String
The path of the cookie.
expiry
Type: OnlineSystem Nullable OnlineDateTime 
The expiration date of the cookie.
Exceptions

ExceptionCondition
OnlineSystem ArgumentExceptionIf the name is   or an empty string, or if it contains a semi-colon.
OnlineSystem ArgumentNullExceptionIf the value is  .
See Also