Skip to content

← All questions

testIdAttribute is data-test, so why does the heal suggestion say getByTestId?

Asked 8,760 views2 answers

Our app has used data-test since long before we adopted SDODS. I set it in the project file:

yaml
testIdAttribute: data-test

Heal report suggests getByTestId('cart-badge') for a locator that healed. I pasted that into the page object expecting it to look for data-testid and fail. It works. I would like to understand why before I trust it in twenty other places.

asked by Yusuf Demir201 ·

2 answers

Know the answer?

Reviewed before it appears. Wrap commands and output in triple backticks and they will render as a code block.

Have a different question? Ask it.

Related