StrikekitStrikekit

set local storage

Write a key/value pair into the current page localStorage

Write a key/value pair into the current page's localStorage via an engine-internal page evaluate (not a general run js command — no such command exists).

Syntax

When I set local storage "<key>" to "<value>"

Qualifiers

QualifierRoleExample
toStorage valueset local storage "token" to "abc"

Requirements

ItemContract
Element / control shapeNone — localStorage key/value on current origin
How the label bindsKey + value payloads
Qualifiers that change resolveto
PlatformWeb only (navigate first)
Wrong shape → use insteadsessionStorage → set session storage

See also UI contracts.

Examples

Given I navigate to "https://example.com"
When I set local storage "token" to "abc123"

Notes

  • Requires a loaded page (navigate first).
  • Quoted values resolve like every other step ($ENV, @ / @@). Reports keep the raw .stk quote.
  • Web only. Appium / Platform: api return unsupported.

On this page