Class ExtensionsAdapter
- Namespace
- OpenQA.Selenium.DevTools.V148.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
sessionIDevToolsSessionThe IDevToolsSession to be used with this adapter.
Exceptions
- ArgumentNullException
If
sessionis null.
Properties
Session
Gets the DevToolsSession associated with the adapter.
public IDevToolsSession Session { get; }
Property Value
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
commandClearStorageItemsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetExtensions(GetExtensionsCommandSettings?, CancellationToken, int?, bool)
Gets a list of all unpacked extensions. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.
public Task<GetExtensionsCommandResponse> GetExtensions(GetExtensionsCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetExtensionsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
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
commandGetStorageItemsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
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
commandLoadUnpackedCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
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
commandRemoveStorageItemsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
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
commandSetStorageItemsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
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
commandTriggerActionCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
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
commandUninstallCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool