'How can I Click on an HTML element located into an iFrame, via Edge?

What is the command for executing script via Edge browser in order to click on the below HTML element having id="card"? Trying to get JS path from Google Chrome dev tool I get document.querySelector("#card") but unfortunately executing script document.querySelector("#card").click(); I get no response.

I also get no response If I run the same script directly from the console of Google Chrome dev tool.


    **<body id="phy_iframe_body" style="overflow-y: auto; position: relative;" class="febs-1is83mAeC4 febs-3HdtAbo6-T"><div class="prel nui-skin-default febs-2FA2VMEVhD" id="comps-c"><div data-reactroot=""><div></div><div class="febs-1y2tcE5eIC nui-skin-grey febs-uWoGfVsCne"><div class="febs-2-jq4FnCCM"></div></div><div class="nui-skin-grey febs-3AW-0BK9ot"><div class="febs-tzPobVR_W4"></div></div></div></div><div id="root" style="height: 100%; margin-top: 0px;" class="phy_iframe_root"><div style="height: 100%;"><div id="phyinvMainPage" class="phyinv_main_page en"><div class="phyinb_tabs_header"><div id="ev_tab_10000" class="ev_tab phyinv_tabs" draggable="true"><div class="ev_tab_header top ev_tab_header_block"><div style="display: flex;"><div id="room" class="ev_tab_title display " draggable="true" tabindex="0" title="Equipment Rooms" style="min-width: 9px;"><span class="ev_tab_bar"></span>Equipment Rooms</div><div id="rack" class="ev_tab_title display " draggable="true" tabindex="0" title="Racks" style="min-width: 4px;"><span class="ev_tab_bar"></span>Racks</div><div id="ne" class="ev_tab_title display active " draggable="true" tabindex="0" title="NEs" style="min-width: 4px;"><span class="ev_tab_bar"></span>NEs</div><div id="frame" class="ev_tab_title display " draggable="true" tabindex="0" title="Subracks" style="min-width: 5px;"><span class="ev_tab_bar"></span>Subracks</div><div id="card" class="ev_tab_title display " draggable="true" tabindex="0" title="Boards" style="min-width: 5px;"><span class="ev_tab_bar"></span>Boards</div><div id="subcard" class="ev_tab_title display " draggable="true" tabindex="0" title="Subboards" style="min-width: 6px;"><span class="ev_tab_bar"></span>Subboards</div><div id="ltp" class="ev_tab_title " draggable="true" tabindex="0" title="Ports" style="min-width: 4px;"><span class="ev_tab_bar"></span>Ports</div><div id="more" class="ev_tab_title disabled" draggable="true" title="More" style="min-width: 2px;"><span class="ev_tab_bar"></span>More</div></div><span class="ev_tab_title_foldimg " tabindex="0"></span><div class="ev_tab_title_hideTabs" style="display: none;"><div id="ev_scroll_1000" class="evReact-scrollbar-default" style="height: 12rem; overflow: hidden; position: relative;"><div class="evReactjs-scrollbar-area evReactjs-scrollbar-area    " style="margin-top: 0rem; margin-left: 0px;"><div id="room" class="ev_tab_title display " draggable="true" tabindex="0" title="Equipment Rooms" style="min-width: 9px;">Equipment Rooms</div><div id="rack" class="ev_tab_title display " draggable="true" tabindex="0" title="Racks" style="min-width: 4px;">Racks</div><div id="ne" class="ev_tab_title display active " draggable="true" tabindex="0" title="NEs" style="min-width: 4px;">NEs</div><div id="frame" class="ev_tab_title display " draggable="true" tabindex="0" title="Subracks" style="min-width: 5px;">Subracks</div>**



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source