> 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-element-attribute.md). Agents can also search and read this documentation through its [MCP server](https://docs.does.qa/~gitbook/mcp).

# Store Element Attribute

Save an attribute value from a specific element into the value store.

Store Element Attribute reads an HTML attribute from an [Element](https://docs.does.qa/elements/creating-elements.md) and saves it in the [Value Store](https://docs.does.qa/values/value-store.md). Use it when a later step needs `href`, `data-*`, or another attribute value.

![Store element attribute Test Step](https://static.does.qa/assets/nodes/data_store_elementAttribute.png)

## When to use it

* Capture a link URL, image `src`, or `data-testid` for a later navigation or check.
* Save an ID or token exposed only as an attribute.
* Prefer [Store element text](https://docs.does.qa/test-steps/data/store-element-text.md) for visible label text, and [Store element value](https://docs.does.qa/test-steps/data/store-element-value.md) for input values.

## Configure

### Basics

| Field            | What to set                                                               |
| ---------------- | ------------------------------------------------------------------------- |
| **Element**      | The [Element](https://docs.does.qa/elements/creating-elements.md) to read |
| **Attribute**    | Attribute name, such as `href` or `data-id`                               |
| **Storage Name** | Name later steps will use in the Value Store                              |

### Advanced

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

## Related

* [Store element text](https://docs.does.qa/test-steps/data/store-element-text.md)
* [Store element value](https://docs.does.qa/test-steps/data/store-element-value.md)
* [Store element HTML](https://docs.does.qa/test-steps/data/store-element-html.md)
* [Store element count](https://docs.does.qa/test-steps/data/store-element-count.md)
* [Data](https://docs.does.qa/test-steps/data.md)

**Tags:** `data`, `store`, `elementAttribute`, `element`, `attribute`, `scrape`
