page-modeller
page-modeller copied to clipboard
Allow to specify a unique property instead of ID
Very good tool, it would be perfect if we could tell the SPY to look at another unique property instead of the id
<input class="form-control ng-pristine ng-invalid ng-touched" formcontrolname="prenom" type="text" placeholder="Nom" style="null">
manual trick
- create id with the same value of formcontrolname
- after export i replace id by original property
elements = document.querySelectorAll('[formcontrolname]:not([id])') elements.forEach((item, index) => { value = item.getAttribute('formcontrolname') item.setAttribute('id', value) })