I'm trying to use automation to display more information on click of a "more details" link on a popup, but the link doesn't have any id associated with it. When I inspect the link in the Chrome console, it appears to be the "href="#myCollapse"" line in the associated element below. I don't really understand js but tried something like document.getElementById('#myCollapse'). click();...and try to use the child with id="popup-content".
<div id="popup-content"> <span id="overlayAddress">SCOTTISH PARLIAMENT 1 HORSE WYND OLD TOWN </span><br> <span id="overlayTown">EDINBURGH</span><br> <span id="overlayPostCode">EH99 1SP</span> <br> <a href="#myCollapse" data-bs-toggle="collapse" class="collapsed" aria-expanded="false">更多详情</a> <div class="collapse" id="myCollapse" style=""> <label style="color:white;"><b>UPRN : </b></label><span id="overlayuprn">906423108</span><br> <label style="color:white;"><b>POSTAL TOWN : </b></label><span id="overlayPostTown">EDINBURGH</span><br> <label style="color:white;"><b>CUSTODIAN : </b></label><span id="overlayCustodian">City of Edinburgh</span><br> </div> </div>
Just use the following selector: