As a part of this development effort, I’ve been introducing data-testid as an attribute to elements for more stable tests. Up until now, the best option would be getByRole for the most part and then xpath for elements that are difficult to identify.
https://www.reddit.com/r/QualityAssurance/comments/15axlgr/should_we_not_use_datatestid_for_element/



