jenson
jenson

Reputation: 31

how to get DOM tree by 'chrome devtool protocol '

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

Answers (1)

panda
panda

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

Related Questions