Table of Contents

Interface ISessionStorage

Namespace
OpenQA.Selenium.Html5
Assembly
WebDriver.dll

Represents the session storage for the site currently opened in the browser. Each site has its own separate storage area.

public interface ISessionStorage

Properties

Count

Gets the number of items in session storage.

int Count { get; }

Property Value

int

Methods

Clear()

Clears local storage.

void Clear()

GetItem(string)

Returns value of the session storage given a key.

string GetItem(string key)

Parameters

key string

key to for a session storage entry

Returns

string

Value of the session storage entry as string given a key.

KeySet()

Returns the set of keys associated with session storage.

ReadOnlyCollection<string> KeySet()

Returns

ReadOnlyCollection<string>

Returns the set of keys associated with session storage as HashSet<T>.

RemoveItem(string)

Removes key/value pair from session storage.

string RemoveItem(string key)

Parameters

key string

key to remove from storage

Returns

string

Value from session storage as string for the given key.

SetItem(string, string)

Adds key/value pair to session storage.

void SetItem(string key, string value)

Parameters

key string

storage key

value string

storage value