Live data from Hacker News

Firefox 56 supports headless mode on Windows

bugzilla.mozilla.org

31–40 of 88 posts

Re: Firefox 56 supports headless mode on Windows

#31

Anyone know if this supports audio playback?

Firefox audio developer here. I haven't heard from the folks doing this, and I would have been the person doing the code reviews so I suppose it's left untouched.

Edit: looking at the code, it will work just fine, and that means I can even use it myself to run Firefox's unit and integration tests, I usually use xvfb on Linux.

Re: Firefox 56 supports headless mode on Windows

#32
post #22

"headless" Poke me when there are no X11/Qt/GTK/whatever dependencies at all - that is headless. https://packages.debian.org/stretch/firefox-esr

Upvote the bug! https://bugzilla.mozilla.org/show_bug.cgi?id=1372998

I doubt it'll happen anytime too soon, but Mozilla should see the community interest.

Re: Firefox 56 supports headless mode on Windows

#33
post #5

So I can navigate by cardinal directions now (like scrolling south a bit)? Joke aside: can somone explain "headless" to me here?

When you run the browser, but it doesn't actually display anything on screen. Uses include rendering a screenshot (e.g. a preview thumbnail) of some website on a server, or running automated UI tests that click around a web app and fill out forms to verify its functionality.

Thank you for taking the time to explain. I had the same question.

Re: Firefox 56 supports headless mode on Windows

#35
What are the biggest challenges when implementing headless mode? I'm asking cause this feature took some time to be delivered both in Firefox and Chrome and I always assumed that it should be 'pretty' straightforward to implement. Is it that both engines were coupled with GUI libs?

Re: Firefox 56 supports headless mode on Windows

#36
It's not very clear how to actually use this in a test environment like Selenium etc. At least with headless Chrome there are libraries now to drive it via the remote debug protocol like https://github.com/LucianoGanga/simple-headless-chrome

This feels a little nicer than Selenium as it's one less layer of abstraction.

EDIT: guess from other comments WebDriver is the right method to access.

Re: Firefox 56 supports headless mode on Windows

#37
post #12

I was wondering if I could use this (using a plugin) or Chrome to generate PDF files on the web server. Most of the PDF generation software out there are quite expensive.

Maybe it's possible with the print option Chrome offers. Regular Chrome can print to PDF files. Maybe headless Chrome supports that. Edit: It's possible. It's on the introduction page of Chrome Headless https://developers.google.com/web/updates/2017/04/headless-c... Look at 'Create a PDF'

Here's a simple library to do that: https://github.com/LucianoGanga/simple-headless-chrome

Re: Firefox 56 supports headless mode on Windows

#38

What are the biggest challenges when implementing headless mode? I'm asking cause this feature took some time to be delivered both in Firefox and Chrome and I always assumed that it should be 'pretty' straightforward to implement. Is it that both engines were coupled with GUI libs?

My money would be on it being a low priority feature than being difficult to implement.

Re: Firefox 56 supports headless mode on Windows

#39

What are the biggest challenges when implementing headless mode? I'm asking cause this feature took some time to be delivered both in Firefox and Chrome and I always assumed that it should be 'pretty' straightforward to implement. Is it that both engines were coupled with GUI libs?

Probably just good old software engineering. Getting a 15-20 million SLOC codebase to work in an environment it wasn't designed to handle takes time.
Post reply on HN