alpine-chrome icon indicating copy to clipboard operation
alpine-chrome copied to clipboard

Return DOM after full loading page.

Open boorwey opened this issue 3 years ago • 3 comments

Me need to get the markup after the page is fully loaded and the javascript is running.

Run docker container run -it --rm zenika/alpine-chrome --no-sandbox --dump-dom https://www.mysite.com/ works well, but I get not the html that the real browser gives.

Perhaps I missed something and hope for your help.

boorwey avatar Jul 31 '20 06:07 boorwey

Hi @boorwey

Sorry for the delay and thanks for your report.

I think you cannot get the "real DOM" the browser generates with the command --dump-dom command. As described here, it Instructs headless_shell to print document.body.innerHTML to stdout. ↪

If you want to get the current DOM, you need to use something like the DevTools perhaps using Puppeteer. If you succeed doing it with puppeteer, I am very interested to share it as an example in this repository.

I hope this helps and thank again for your issue. 👍

jlandure avatar Aug 20 '20 16:08 jlandure

Hi @boorwey 👋

Did you succeed with your problem? 👍

jlandure avatar Mar 23 '21 20:03 jlandure

I have this use case as well. Too bad no feedback about it :<

Enissay avatar Sep 11 '22 20:09 Enissay