Table of Contents

Class RemoteLocalStorage

Namespace
OpenQA.Selenium.Remote
Assembly
WebDriver.dll

Defines the interface through which the user can manipulate local storage.

public class RemoteLocalStorage : ILocalStorage
Inheritance
RemoteLocalStorage
Implements
Inherited Members

Constructors

RemoteLocalStorage(RemoteWebDriver)

Initializes a new instance of the RemoteLocalStorage class.

public RemoteLocalStorage(RemoteWebDriver driver)

Parameters

driver RemoteWebDriver

The RemoteWebDriver for which the application cache will be managed.

Properties

Count

Gets the number of items in local storage.

public int Count { get; }

Property Value

int

Methods

Clear()

Removes all entries from the local storage.

public void Clear()

GetItem(string)

Returns local storage value given a key.

public string GetItem(string key)

Parameters

key string

The key value for the item in storage.

Returns

string

A local storage string value given a key, if present, otherwise returns null.

KeySet()

Returns a read-only list of local storage keys.

public ReadOnlyCollection<string> KeySet()

Returns

ReadOnlyCollection<string>

A read-only list of local storage keys.

RemoveItem(string)

Removes local storage entry for the given key.

public string RemoveItem(string key)

Parameters

key string

key to be removed from the list

Returns

string

Response value stringfor the given key.

SetItem(string, string)

Sets local storage entry using given key/value pair.

public void SetItem(string key, string value)

Parameters

key string

local storage key

value string

local storage value