I am working on a angular project having thousands of html files. Now we are trying to implement UI test automation using cypress. However, we are facing some difficulties in uniquely identify UI elements in cypress. Adding data-testid to all UI elements will resolve this issue. but manually adding data-testid to all UI elements will be a time consuming task.
I am looking for a solution to automatically add a unique data-testid to all UI elements by combining context_name_element_id.
Any help would be appreciated.
Expecting an easy solution to automatically add data-testid to all UI elements in angular application automatically.
ProgameziaDrive is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.