Table of Contents

Class ExtensionsAdapter

Namespace
OpenQA.Selenium.DevTools.V146.Extensions
Assembly
Selenium.WebDriver.dll

Represents an adapter for the Extensions domain to simplify the command interface.

public class ExtensionsAdapter
Inheritance
ExtensionsAdapter
Inherited Members

Constructors

ExtensionsAdapter(IDevToolsSession)

Initializes a new instance of the ExtensionsAdapter class.

public ExtensionsAdapter(IDevToolsSession session)

Parameters

session IDevToolsSession

The IDevToolsSession to be used with this adapter.

Exceptions

ArgumentNullException

If session is null.

Properties

Session

Gets the DevToolsSession associated with the adapter.

public IDevToolsSession Session { get; }

Property Value

IDevToolsSession

Methods

ClearStorageItems(ClearStorageItemsCommandSettings, CancellationToken, int?, bool)

Clears extension storage in the given storageArea.

public Task<ClearStorageItemsCommandResponse?> ClearStorageItems(ClearStorageItemsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ClearStorageItemsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ClearStorageItemsCommandResponse>

GetStorageItems(GetStorageItemsCommandSettings, CancellationToken, int?, bool)

Gets data from extension storage in the given storageArea. If keys is specified, these are used to filter the result.

public Task<GetStorageItemsCommandResponse> GetStorageItems(GetStorageItemsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetStorageItemsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetStorageItemsCommandResponse>

LoadUnpacked(LoadUnpackedCommandSettings, CancellationToken, int?, bool)

Installs an unpacked extension from the filesystem similar to --load-extension CLI flags. Returns extension ID once the extension has been installed. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.

public Task<LoadUnpackedCommandResponse> LoadUnpacked(LoadUnpackedCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command LoadUnpackedCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<LoadUnpackedCommandResponse>

RemoveStorageItems(RemoveStorageItemsCommandSettings, CancellationToken, int?, bool)

Removes keys from extension storage in the given storageArea.

public Task<RemoveStorageItemsCommandResponse?> RemoveStorageItems(RemoveStorageItemsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command RemoveStorageItemsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<RemoveStorageItemsCommandResponse>

SetStorageItems(SetStorageItemsCommandSettings, CancellationToken, int?, bool)

Sets values in extension storage in the given storageArea. The provided values will be merged with existing values in the storage area.

public Task<SetStorageItemsCommandResponse?> SetStorageItems(SetStorageItemsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetStorageItemsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetStorageItemsCommandResponse>

TriggerAction(TriggerActionCommandSettings, CancellationToken, int?, bool)

Runs an extension default action. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.

public Task<TriggerActionCommandResponse?> TriggerAction(TriggerActionCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command TriggerActionCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<TriggerActionCommandResponse>

Uninstall(UninstallCommandSettings, CancellationToken, int?, bool)

Uninstalls an unpacked extension (others not supported) from the profile. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging.

public Task<UninstallCommandResponse?> Uninstall(UninstallCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command UninstallCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<UninstallCommandResponse>