Using puppeteer how do you get all child nodes of a node?
问题 I'm having trouble finding a way to iterate subnodes of a given node in puppeteer. I do not know the html structure beforehand, just the id of the parent element. var elemId = "myelemid"; const doc = await page._client.send('DOM.getDocument'); const node = await page._client.send('DOM.querySelector', { nodeId: doc.root.nodeId, selector: '#' + elemId }); //node.children empty //node['object'].children empty //try requesting childnodes var id = node.nodeId; var childNodes = await page._client