> 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/elements/selector-types/test-id.md).

# Test ID

Test ID finds Elements by attributes added for testing. These selectors stay stable when classes, layout, or visible copy change, so they are the preferred choice for durable tests.

DoesQA searches for the following test-ids matching the given text:

```
'data-test'
'data-testid'
'data-test-id'
'data-qa'
'data-qa-id'
'data-at'
'data-at-id'
'data-dqa'
'data-dqa-id'
'data-trackable'
'data-dyn-controlname'
'data-dyn-role'
'data-site-id'
```

Ask your development team to add one of these attributes to controls you interact with often. See [Creating Elements](/elements/creating-elements.md) to add a Manual Element with a Test ID selector.

**Examples:**

* `[data-testid="login-button"]`
* `[data-test="product-card-1"]`
* `[data-test-id="cart-item-count"]`
* `[data-qa="error-message"]`

## Related

* [CSS](/elements/selector-types/css.md)
* [XPath](/elements/selector-types/xpath.md)
* [Visible Text](/elements/selector-types/visible-text.md)
* [Creating Elements](/elements/creating-elements.md)
* [Choose durable selectors](/better-coverage/choose-durable-selectors.md)
