Node.js Puppeteer clicking on the expand arrow
I am trying to click on the expand icon for "My Team".
Element: My Team<a id="pt1:_UISnvr:0:nvgcil_groupNode_manager_resources".....
Selector: #pt1:_UISnvr:0:nvgpgl2_groupNode_manager_resources
JS Path: document.querySelector("#pt1\:_UISnvr\:0\:nvgpgl2_groupNode_manager_resources")
Xpath: //*[@id="pt1:_UISnvr:0:nvgpgl2_groupNode_manager_resources"]
I have tried a few variations of the above including just the ID, however I am not having any luck. What is the proper format for page.click?
await page.click('#pt1\\\:_UISnvr\\\:0\\\:nvgpgl2_groupNode_manager_resources');
<div id="pt1:_UISnvr:0:nvgpgl2_groupNode_manager_resources" title="My Team" class="navmenu-header x1a"><div><span class="x3im">My Team</span></div><div><a id="pt1:_UISnvr:0:nvgcil_groupNode_manager_resources" title="Expand My Team" class="svg-func svg-highlight size12 xkm" style="padding-top: 2.5px; width: 20.58px; transform: rotate(0deg); padding-bottom: 0px;" onclick="this.focus();return false;" href="#"><svg id="pt1:_UISnvr:0:nvgcil_groupNode_manager_resources::icon" class="xi6" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><g><path class="svg-icon03" d="M13.083,7L11.973,5.98,7.988,9.965,4.027,5.98l-1.078.985L7.973,12.02l0.043-.039L8.058,12.02Z"></path></g></svg><span class="xmo"> </span></a></div></div>
from Recent Questions - Stack Overflow https://ift.tt/36oDlGN
https://ift.tt/3iUauiF
Comments
Post a Comment