> 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/check/check-attribute.md).

# Check Attribute

Check Attribute compares an HTML attribute on an [Element](/elements/creating-elements.md) against what you expect. Use it for `href`, `src`, `data-*`, and other attributes.

![Check attribute Test Step](https://app.does.qa/screenshots/node/check_attribute.png)

## When to use it

* Confirm a link points at the expected URL or path.
* Verify an image `src` or a `data-testid` after dynamic content loads.
* Store the attribute first with [Store element attribute](/test-steps/data/store-element-attribute.md) when a later step needs the same value.

## Configure

### Basics

| Field               | What to set                                                                    |
| ------------------- | ------------------------------------------------------------------------------ |
| **Element**         | The [Element](/elements/creating-elements.md) to check                         |
| **Attribute**       | Attribute name (for example `href` or `data-status`)                           |
| **Comparison Type** | [Comparison Type](/test-step-options/comparison-type.md) (`equals` by default) |
| **Value**           | Expected attribute value as text and/or a [Value](/values/value-store.md)      |

### Advanced

| Field                                 | What to set                                                          |
| ------------------------------------- | -------------------------------------------------------------------- |
| **Status on fail**                    | [Failed Status](/test-step-options/failed-status.md)                 |
| **When should screenshots be taken?** | `Always` or `On Failures` (default)                                  |
| **Value Standardization**             | [Value Standardization](/test-step-options/value-standardization.md) |

## Related

* [Store element attribute](/test-steps/data/store-element-attribute.md)
* [Check Value](/test-steps/check/check-value.md)
* [Check](/test-steps/check.md)

**Tags:** `check`, `attribute`, `test`, `expect`, `assert`, `element`
