Table of Contents

Class ReturnedCookie

Namespace
OpenQA.Selenium.Internal
Assembly
WebDriver.dll

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, Uri)

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, Uri currentUrl)

Parameters

name string

The name of the cookie.

value string

The value of the cookie.

domain string

The domain of the cookie.

path string

The path of the cookie.

expiry DateTime?

The expiration date of the cookie.

isSecure bool

true if the cookie is secure; otherwise false

currentUrl Uri

The current System.Uri the browser is viewing.

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

CurrentHost

Gets the current URL the browser is viewing.

public string CurrentHost { get; }

Property Value

string

Secure

Gets a value determining if the cookie is secure.

public override bool Secure { get; }

Property Value

bool

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.