Headless mode in Firefox
51–60 of 191 posts
Re: Headless mode in Firefox
#52This is very nice. What's the recommended way to run end-to-end tests in headless firefox _and_ headless chrome? Can't wait for a cross-platform headless Edge :-)
(And yeah, cross-platform Edge would be nice for being able to test in CI without needing a third party.)
Re: Headless mode in Firefox
#53Can you tell Firefox to print in headless mode? I want to write reports using HTML and JS, but printing is always an issue.
You can generate pdfs with headless Chromium/Chrome pretty easily[1]. chromium-browser --headless --disable-gpu --print-to-pdf=output_file_name.pdf file:///path/to/your/html [1] https://developers.google.com/web/updates/2017/04/headless-c...
Re: Headless mode in Firefox
#54For all of you old fogies working on angular 1 apps and are running browser tests with karma you can run your tests in firefox with headless mode with a customer launcher. Add the snippet below to your karma conf ``` browsers: ['FirefoxHeadless'], customLaunchers: { FirefoxHeadless: { base: 'Firefox', flags: [ '-headless', ], }, }, ``` Note you need to be running the beta version of firefox, I needed to download it f…
> Note you need to be running the beta version of firefox Also note that that's only the case on Windows and OS X (it's already released for Linux), and only as long as Firefox 56 hasn't been released yet :)
Re: Headless mode in Firefox
#55Earlier quoted context omitted.
Adding to ^. You don't need to have the Xorg stuff running to run tests.
That's what Xvfb is for. "xvfb-run firefox" and "firefox -headless" should be functionally equivalent. But I would still be interested in performance comparison with numbers.
Re: Headless mode in Firefox
#56since you're setting the environment variable to be headless what happens if you're browsing with Firefox while running your automated process?
You don't need to set all your environment variables in your bashrc, if that's not obvious. They're not global state. You can change them on a per-terminal basis, and that only effects the environment of that one terminal. Firefox does some weird stuff with multiprocessing, where if you run the firefox command twice you only get one process. I don't know how that would effect things, but I imagine just setting the en…
Re: Headless mode in Firefox
#57Re: Headless mode in Firefox
#58Earlier quoted context omitted.
It would be cool if browsers could highlight URLs that contain the kind of characters which are commonly used to spoof, though I suppose it would lead people to a false sense of security.
Just set your browser to always show punycode. On Firefox, network.IDN_show_punycode = true URLs are no place for unicode characters to hide in. An xn-- prefix is all the warning you need.
Re: Headless mode in Firefox
#59For all of you old fogies working on angular 1 apps and are running browser tests with karma you can run your tests in firefox with headless mode with a customer launcher. Add the snippet below to your karma conf ``` browsers: ['FirefoxHeadless'], customLaunchers: { FirefoxHeadless: { base: 'Firefox', flags: [ '-headless', ], }, }, ``` Note you need to be running the beta version of firefox, I needed to download it f…
Does this offer any real benefit over Xvfb?
Re: Headless mode in Firefox
#60Earlier quoted context omitted.
You can generate pdfs with headless Chromium/Chrome pretty easily[1]. chromium-browser --headless --disable-gpu --print-to-pdf=output_file_name.pdf file:///path/to/your/html [1] https://developers.google.com/web/updates/2017/04/headless-c...
If only browsers supported creation of page headers and footers.