Reputation: 31
I don’t understand how to use this protocol(chrome devtool protocol) to get the entire DOM tree. My understanding of this protocol is not deep enough. If anyone knows how to get the DOM tree and tell me, I would be very grateful. Besides, if you can recommend this The protocol learning materials are even better.
Upvotes: 2
Views: 1206
Reputation: 41
https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getDocument it will helps you
await client.send("DOM.getDocument", { pierce: true, depth: -1 });
Upvotes: 4