Skip to main content

Set Storage Item

Description

Use this activity when setting the key-value pair to local storage, session storage, and webpage cookies.

Properties

Input

  • Storage Type - Specify the type of storage to save the Key-Value pair. The following options are available.
Storage TypeDescription
Local StorageSets the Key-Value pair inside the browser's local storage.
Session Storagesets the Key-Value pair inside the browser's session storage.
CookiesSets the Key-Value pair inside Cookies.
  • Key – Specify the key for storing the value.
  • Value – Specify the value to store. During storage, the value will be URL encoded.
tip

To provide the properties of the cookie, we can give key values as
Key: "TestCookie"
Value: "TestCookieValue; expires=Thu, 7 Dec 2023 12:00:00 UTC; path=/"

  • As mentioned above, the user can also provide other properties (expires, path, etc.) here.
  • Web Page – Specify the webpage object of the currently opened web page.

Misc

  • DisplayName – Add a display name to your activity.
  • Private – By default, activity will log the values of your properties inside your workflow. If private is selected, then it stops logging.

Optional

  • Continue On Error – It Specifies whether the automation should continue even when the activity throws an error. If True, the activity continues without throwing any exceptions. If False, the activity throws an exception. The default value is False.
note

Catches no error if this activity is present inside the Try-Catch block and the value of this property is True.

  • Timeout – An Argument of type Timespan Specifies the activity's waiting time to run before an error occurs and aborts the workflow. By default, the Timeout value is 10 minutes.

Output

  • Result – Returns the boolean value True if it sets the storage item successfully.

Example

Download Example

Set Storage Item