admin管理员组文章数量:1415119
Without having read too much about cdp (only the main cdp page and the getting started guide) - is it possible at all to get a nodeId on the client?
My use case would be roughly this
const handle = elementHandleFromNodeId(await page.evaluate(() => {
return getNodeIdOfElementSomehow(document.getElementById("test-id"));
});
And yes, I am fully aware of the fact that I can just do page.$("#test-id")
but that's not what I want to do. The full use case is a bit too large for a SO question.
My current workaround involves setting a unique data* attribute and querying that on the backend but if possible at all I'd like to avoid that.
本文标签: puppeteeraccess cdp from clientStack Overflow
版权声明:本文标题:puppeteer - access cdp from client - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745203587a2647520.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论