How to add data attributes for test automation
How to add data attributes for test automation
danielvianna
Posts: 15Questions: 7Answers: 0
in Editor
I am using cypress to test automation and we are adding data attributes in the application to make the test more stable and avoid using xpath.
There is a part of the app to upload a csv file and I can't add the data attribute for the button in the popup.
I was able to add the attributes for the dropdowns but I can't for the button.
I tryied this but didn't work
the weird is that I did the same in another button and worked
Can someone please help me with this?
Thank you
This discussion has been closed.
Answers
In your code, if you change
to be
you should be good to go. See example here.
Colin