Headless Chrome: --dump-dom doesn't work
Reported by
gembox.j...@gmail.com,
Aug 16 2017
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0 Steps to reproduce the problem: 1. Windows 10, Google Chrome Version 60.0.3112.101 (Official Build) (64-bit) 2. Command Prompt, Run as administrator 3. cd "C:\Program Files (x86)\Google\Chrome\Application\" 4. chrome --headless --disable-gpu --screenshot https://www.chromestatus.com/ -> this works, C:\Program Files (x86)\Google\Chrome\Application\60.0.3112.101\screenshot.png was created 6. chrome --headless --disable-gpu --dump-dom https://www.chromestatus.com/ -> this doesn't work. Command prompt doesn't contain any HTML. Some help? 7. Note that --print-to-pdf works, but --repl doesn't work. What is the expected behavior? chrome --headless --disable-gpu --dump-dom https://www.chromestatus.com/ should return inner HTML. What went wrong? chrome --headless --disable-gpu --dump-dom https://www.chromestatus.com/ doesn't return anything. Did this work before? No Chrome version: 60.0.3112.101 Channel: stable OS Version: 10.0 Flash Version:
,
Aug 17 2017
I've tried this on many Windows machines here and none of them worked. It always just quits with no output (--dump-dom, --repl, etc. - all copied from https://developers.google.com/web/updates/2017/04/headless-chrome). Same for screenshots and other things; none of them work. If I pass a url for a page that connects to a server (eg. opens a web socket), it seems to load the page, opens my web socket and then immediately terminates (the web socket immediately closes after being opened). Version 60.0.3112.101 (Official Build) (64-bit) Tried at work and at home, and on several colleagues machines. All Windows 10 (some Pro, some Enterprise), varying hardware (inc. different GPUs).
,
Aug 21 2017
Thanks for the report. Two things: 1) In Windows you need to enable logging to view stdout 2) You might have permissions problems with running on the Program files. So for screenshot and print-to-pdf command is always advise to indicate an output directory, in the form --screenshot=c:\tmp\out.png For instance, with Chrome Canary installed, I've verified that this command works: "%USERPROFILE%\AppData\Local\Google\Chrome SxS\Application\chrome.exe" --headless http://example.com --enable-logging --dump-dom Note that the blog post was written when only linux support was offered.
,
Aug 21 2017
,
Aug 25 2017
I have tried your proposal and it doesn't work with 60.0.3112.101 (stable), but it works with Canary. I think that using Canary version will be ok for us. Thank you for the help! |
||
►
Sign in to add a comment |
||
Comment 1 by l...@chromium.org
, Aug 16 2017