Firefox Headless ---Screenshot not working for local HTML files
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?
Additional System Details
- Shockwave Flash 32.0 r0
- User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Firefox/60.0
This could be related to this pref:
- privacy.file_unique_origin = false
See also this thread for some remarks when I tested headless mode:
- /questions/1256647 Headless Firefox doesn't work