Class Extensions
java.lang.Object
org.openqa.selenium.devtools.v129.extensions.Extensions
Defines commands and events for browser extensions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.openqa.selenium.devtools.Command<Void>
clearStorageItems
(String id, StorageArea storageArea) Clears extension storage in the given `storageArea`.getStorageItems
(String id, StorageArea storageArea, Optional<List<String>> keys) Gets data from extension storage in the given `storageArea`.static org.openqa.selenium.devtools.Command<String>
loadUnpacked
(String path) Installs an unpacked extension from the filesystem similar to --load-extension CLI flags.static org.openqa.selenium.devtools.Command<Void>
removeStorageItems
(String id, StorageArea storageArea, List<String> keys) Removes `keys` from extension storage in the given `storageArea`.static org.openqa.selenium.devtools.Command<Void>
setStorageItems
(String id, StorageArea storageArea, Map<String, Object> values) Sets `values` in extension storage in the given `storageArea`.
-
Constructor Details
-
Extensions
public Extensions()
-
-
Method Details
-
loadUnpacked
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. -
getStorageItems
public static org.openqa.selenium.devtools.Command<Map<String,Object>> getStorageItems(String id, StorageArea storageArea, Optional<List<String>> keys) Gets data from extension storage in the given `storageArea`. If `keys` is specified, these are used to filter the result. -
removeStorageItems
public static org.openqa.selenium.devtools.Command<Void> removeStorageItems(String id, StorageArea storageArea, List<String> keys) Removes `keys` from extension storage in the given `storageArea`. -
clearStorageItems
public static org.openqa.selenium.devtools.Command<Void> clearStorageItems(String id, StorageArea storageArea) Clears extension storage in the given `storageArea`. -
setStorageItems
public static org.openqa.selenium.devtools.Command<Void> setStorageItems(String id, StorageArea storageArea, Map<String, Object> values) Sets `values` in extension storage in the given `storageArea`. The provided `values` will be merged with existing values in the storage area.
-