Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to capture a DOM snapshot [duplicate]

I'm trying to interact with a webpage that displays an element for a couple of seconds and then hides it. It show for around 5 seconds, so it would be probably enough time to right-click on it and inspect it in chrome, but the site has custom context menues associated with the right click.

I open de devtools beforehand, but the 5 seconds are not enouhg time to traverse the DOM structure looking for this element.

Is there any way to take a snapshot of the DOM in the devtools so it freezes all elements and I can inspect them without rush?

Thanks

like image 675
Awer Muller Avatar asked Oct 24 '25 17:10

Awer Muller


1 Answers

  • Save Driver.PageSource at needed moment into string variable.
  • Create html file, edit it and paste that string into it
  • Open it in browser
like image 180
Somber Avatar answered Oct 26 '25 18:10

Somber



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!