I tried to use Firefox (v67b/Win10 and v66/Ubuntu) in headless mode according to https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_Mode. I tested several variations of the screenshot recording command (one dash or two, with or without “–headless”, with or without image path).
It seems the instructions given in the MDN documentation don’t work anymore. In Windows, Firefox background processes were started and kept running but didn’t record anything. In Ubuntu, I got the response “You are running in headless mode”, but nothing else.
I reported this issue to the Firefox support forum (https://support.mozilla.org/en-US/questions/1256647) but a top contributor there suggested that this might rather be a documentation issue than a software bug. If somebody knows how (or if) Firefox headless mode works I’d be grateful to know.