One approach is to customize an application or a specific build for testing or staging purposes in order to simplify the testing process. While this idea is commonly used, it comes with its own set of advantages and disadvantages. Personally, I prefer not to alter existing attribute values but rather focus on creating meaningful ids and data-oriented classes or other attributes.
Using ids offers several benefits - they are more stable, unique, data-driven (meaning they reflect the purpose of the element), and provide a quicker way to locate elements.
For further insights and ideas, check out these related threads:
- Test automation html element selectors. Element ID or DataAttribute
- Is adding IDs to everything standard practice when using Selenium?