> For the complete documentation index, see [llms.txt](https://docs.does.qa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.does.qa/test-steps/data/store-localstorage.md).

# Store LocalStorage

Store LocalStorage reads a named `localStorage` key and saves its value in the [Value Store](/values/value-store.md). Use it when a later step or check needs client-side state the page already wrote.

![Store localStorage Test Step](https://app.does.qa/screenshots/node/data_localStorage_store.png)

## When to use it

* Capture a feature flag or preference after the application sets it.
* Save a token or ID from `localStorage` for a later API step or [Check LocalStorage](/test-steps/check/check-localstorage.md).
* Reuse the stored value in form fields or headers through a [Value](/values/value-store.md) reference.

## Configure

### Basics

| Field                | What to set                                     |
| -------------------- | ----------------------------------------------- |
| **localStorage Key** | Key to read from `localStorage`                 |
| **Value Store Key**  | Name to save the value under in the Value Store |

### Advanced

| Field              | What to set                                          |
| ------------------ | ---------------------------------------------------- |
| **Status on fail** | [Failed Status](/test-step-options/failed-status.md) |

## Related

* [Set LocalStorage](/test-steps/data/set-localstorage.md)
* [Delete LocalStorage](/test-steps/data/delete-localstorage.md)
* [Check LocalStorage](/test-steps/check/check-localstorage.md)
* [Data](/test-steps/data.md)

**Tags:** `data`, `localStorage`, `store`
