5

I'm unable to generate a screenshot of a local HTML file using Firefox's (v60.9.0) headless mode

Here's the command I'm using:

"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P AJ --screenshot test.png "file:///C:/html_export.html"

I've tried with and without a profile and with different numbers of slashes after file. There are no errors in the command line - it just doesn't generate an output.

This command works fine when I substitute the file:// with an external website like:

"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P AJ --screenshot test.png google.com

Could it be related to the redirect bug mentioned here?

Any help is appreciated! Perhaps theres a way to turn on output verbosity for --headless mode?

user3279773
  • 143
  • 2
  • 6
  • 1
    No answer, but you can always run a local server. PHP, Python and Node.js all come with servers for testing, that can be run with one command from the command line. (e.g. php -S localhost:8080 ) – Ideogram Oct 14 '20 at 06:28

0 Answers0