Table of Contents

Interface ICookieJar

Namespace
OpenQA.Selenium
Assembly
WebDriver.dll

Defines an interface allowing the user to manipulate cookies on the current page.

public interface ICookieJar

Properties

AllCookies

Gets all cookies defined for the current page.

ReadOnlyCollection<Cookie> AllCookies { get; }

Property Value

ReadOnlyCollection<Cookie>

Methods

Adds a cookie to the current page.

void AddCookie(Cookie cookie)

Parameters

cookie Cookie

The Cookie object to be added.

DeleteAllCookies()

Deletes all cookies from the page.

void DeleteAllCookies()

Deletes the specified cookie from the page.

void DeleteCookie(Cookie cookie)

Parameters

cookie Cookie

The Cookie to be deleted.

DeleteCookieNamed(string)

Deletes the cookie with the specified name from the page.

void DeleteCookieNamed(string name)

Parameters

name string

The name of the cookie to be deleted.

GetCookieNamed(string)

Gets a cookie with the specified name.

Cookie GetCookieNamed(string name)

Parameters

name string

The name of the cookie to retrieve.

Returns

Cookie

The Cookie containing the name. Returns null if no cookie with the specified name is found.