Load Web Storage
The Load Web Storage step loads data into the local and/or session storage. The local and session storages are used by some websites to persist larger amounts of data that can normally be stored in a cookie.
The data to load can be specified in the data field (see below for an example of how to do this), but this step can also be used to load storage data that has been extracted using an Extract Web Storage step.
Properties
The Load Web Storage action can be configured using the following properties:
- Data
-
Specify the data to load into the local and/or session storage. Normally, this data is taken from a variable that stores the result of having used the Extract Web Storage action, but the data can also be entered or generated specifically.
The data must be specified in JSON format and must be specified as an array of objects. Each object must contain the following properties:
- storage-type
-
The storage type must be either "session" or "local". Session storage will be loaded into the current window and will persist as long as its top-level window exists, similarly to a session cookie. Local storage is shared between all of the browser windows, similarly to a persistent cookie.
- domain
-
The domain whose sites have access to the storage.
- storage
-
An array of items that comprise the storage. Each item is an object with the following properties:
- key
-
The name that is used to look up the item in the storage.
- value
-
The stored value, which must be of type String.
- Example
-
In this example, we wish to define one storage item named "help" with the value "http://help.kofax.com" in the local storage, and two storage items in the session storage, namely "product" with the value "Kofax RPA" and "version" with the value "11". All storage items will be defined for the domain "www.kofax.com".
We enter the following data into the Load Web Storage step:
[ { "storage-type": "local", domain: "www.kofax.com", storage: [ { key: "help", value: "http://help.kofax.com" } ] }, { "storage-type": "session", domain: "www.kofax.com", storage: [ { key: "product", value: "Kofax RPA" }, { key: "version", value: "11" } ] } ]