You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.
I want to use the Page.printToPDF method to dump my web pages for emailing/printing. This functionality is only available when running Chrome with the --headless flag.
However, when I add that flag to my chromeOptions.args, the devtools service cannot find the remote-debugging-port from chrome://version. I've hacked the _findChromePort() method to dump a screenshot, and found that it's just a blank white page.
If I remove the --headless flag from my options, I can see that the page loads correctly, the screenshot has the expected data and the port is found. Everything starts up OK and browser.cdp is injected. The process fails when trying to call Page.printToPDF (as expected).
I guess that loading chrome://version is not supported in headless mode, though I can't find any documentation to support that. It's not an easy phrase to google :)
Is there any other means of finding the debugging port? I'm running chrome using wdio-selenium-standalone so the port is changed often. All help is much appreciated.
The text was updated successfully, but these errors were encountered:
I want to use the
Page.printToPDF
method to dump my web pages for emailing/printing. This functionality is only available when running Chrome with the--headless
flag.However, when I add that flag to my
chromeOptions.args
, the devtools service cannot find the remote-debugging-port from chrome://version. I've hacked the_findChromePort()
method to dump a screenshot, and found that it's just a blank white page.If I remove the
--headless
flag from my options, I can see that the page loads correctly, the screenshot has the expected data and the port is found. Everything starts up OK andbrowser.cdp
is injected. The process fails when trying to callPage.printToPDF
(as expected).I guess that loading chrome://version is not supported in headless mode, though I can't find any documentation to support that. It's not an easy phrase to google :)
Is there any other means of finding the debugging port? I'm running chrome using wdio-selenium-standalone so the port is changed often. All help is much appreciated.
The text was updated successfully, but these errors were encountered: