Initializes a new instance of the Cookie class with a specific name,
value, path and expiration date.
Namespace: OpenQA.SeleniumAssembly: WebDriver (in WebDriver.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax
Parameters
- name
- Type:
System String
The name of the cookie.
- value
- Type:
System String
The value of the cookie.
- path
- Type:
System String
The path of the cookie.
- expiry
- Type:
System Nullable
DateTime
The expiration date of the cookie.
Exceptions
Exception | Condition |
---|---|
![]() | If the name is or an empty string, or if it contains a semi-colon. |
![]() | If the value is . |
See Also