I have two fields with the same id on a single HTML page (using Angular) How to I distinguise between the two without creating a collection and referring to the indexes>
An example of one field is below
I've tried this
#content-container > inv-sidebar-layout-content > ng-component > ng-component > section > div.row.tab-container > as-split > as-split-area:nth-child(1) > article > inv-people-tabs > inv-vertical-tabs-list > div.tab-content-container > div > inv-tab:nth-child(7) > div > inv-people-contact-details-tab > section > div.left-column > inv-person-contact-details > section > inv-address-edit > section > div:nth-child(2) > input
but it's too long and cumbersome
The HTML for the first field is
<input _ngcontent-gec-c113="" class="inv-input" id="towncity" formcontrolname="TownCity">
and for the second it is
<input _ngcontent-gec-c113="" class="inv-input ng-pristine ng-valid ng-touched" id="towncity" formcontrolname="TownCity" ng-reflect-name="TownCity">