Table of Contents

Interface IDOMStorage

Namespace
Selenium.WebDriver.BiDi.Cdp.DOMStorage
Assembly
Selenium.WebDriver.BiDi.Cdp.dll

Query and modify DOM storage.

[Experimental("BIDICDP001")]
public interface IDOMStorage

Properties

DomStorageItemAdded

IEventSource<DomStorageItemAddedEventArgs> DomStorageItemAdded { get; }

Property Value

IEventSource<DomStorageItemAddedEventArgs>

Remarks

Event args (DomStorageItemAddedEventArgs):

  • StorageId
  • Key
  • NewValue

DomStorageItemRemoved

IEventSource<DomStorageItemRemovedEventArgs> DomStorageItemRemoved { get; }

Property Value

IEventSource<DomStorageItemRemovedEventArgs>

Remarks

Event args (DomStorageItemRemovedEventArgs):

  • StorageId
  • Key

DomStorageItemUpdated

IEventSource<DomStorageItemUpdatedEventArgs> DomStorageItemUpdated { get; }

Property Value

IEventSource<DomStorageItemUpdatedEventArgs>

Remarks

Event args (DomStorageItemUpdatedEventArgs):

  • StorageId
  • Key
  • OldValue
  • NewValue

DomStorageItemsCleared

IEventSource<DomStorageItemsClearedEventArgs> DomStorageItemsCleared { get; }

Property Value

IEventSource<DomStorageItemsClearedEventArgs>

Remarks

Event args (DomStorageItemsClearedEventArgs):

  • StorageId

Methods

ClearAsync(StorageId, string?, CancellationToken)

Task<ClearResult> ClearAsync(StorageId storageId, string? session = null, CancellationToken cancellationToken = default)

Parameters

storageId StorageId
session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<ClearResult>

A task representing the asynchronous operation, containing a ClearResult.

DisableAsync(string?, CancellationToken)

Disables storage tracking, prevents storage events from being sent to the client.

Task<DisableResult> DisableAsync(string? session = null, CancellationToken cancellationToken = default)

Parameters

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<DisableResult>

A task representing the asynchronous operation, containing a DisableResult.

EnableAsync(string?, CancellationToken)

Enables storage tracking, storage events will now be delivered to the client.

Task<EnableResult> EnableAsync(string? session = null, CancellationToken cancellationToken = default)

Parameters

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<EnableResult>

A task representing the asynchronous operation, containing a EnableResult.

GetDOMStorageItemsAsync(StorageId, string?, CancellationToken)

Task<GetDOMStorageItemsResult> GetDOMStorageItemsAsync(StorageId storageId, string? session = null, CancellationToken cancellationToken = default)

Parameters

storageId StorageId
session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<GetDOMStorageItemsResult>

A task representing the asynchronous operation, containing a GetDOMStorageItemsResult.

RemoveDOMStorageItemAsync(StorageId, string, string?, CancellationToken)

Task<RemoveDOMStorageItemResult> RemoveDOMStorageItemAsync(StorageId storageId, string key, string? session = null, CancellationToken cancellationToken = default)

Parameters

storageId StorageId
key string
session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<RemoveDOMStorageItemResult>

A task representing the asynchronous operation, containing a RemoveDOMStorageItemResult.

SetDOMStorageItemAsync(StorageId, string, string, string?, CancellationToken)

Task<SetDOMStorageItemResult> SetDOMStorageItemAsync(StorageId storageId, string key, string value, string? session = null, CancellationToken cancellationToken = default)

Parameters

storageId StorageId
key string
value string
session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<SetDOMStorageItemResult>

A task representing the asynchronous operation, containing a SetDOMStorageItemResult.