samedi 18 mai 2019

Is there a tool to enforce HTML elements, that handle user interaction, to have ids (for future auto-testing)?

We are developing a web application using HTML (React), our devs often forget to put id attribute on the elements which will be used in auto-tests. I.E. if a div element is clickable - it should have an id. I'm working on a tool that will, at runtime, check all elements with event handlers attached to them to have an id, and I'm wondering, if there is already such a tool we could reuse or any other tool that solves the same problem?

Upfront clarification: we know how to enforce having id attribute via props for React components, but I'm looking for a more universal approach that would work with any HTML-based UI.

Aucun commentaire:

Enregistrer un commentaire