Once upon a time there was a HTML attribute called Id. She had graduaded from the W3 University, specialized in specifying a unique identifier for an HTML element. For her sister, Class, it was much easier to make friends, as she was able to hang out with multiple elements at the same time. Eventually, Id was almost entirely forgotten, and everyone started to invite only Class to every web site party.
One day the testers were thinking it would be nice if there was someone who could give unique identifiers to HTML elements. They hired Mr. Data-Testid from Nonstandardistan for the job despite he was not formally qualified. Unemployed and sad, Id lived unhappily ever after.
(The moral of the story: there is no need to reinvent the wheel.)