Earlier quoted context omitted.
Still requires a X server, which docker containers won't necessarily have.
Only versions 1.4 and below. Versions 1.5 and above do not require an X server. Version 1.5 has been available for 5+ years: https://ariya.io/2012/03/pure-headless-phantomjs-no-x11-or-x...
Headless mode in Firefox
151–160 of 191 posts
Re: Headless mode in Firefox
#152For 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…
I use karma. Do only Angular 1 folks use it? What does everyone else use for browser tests?
You do "pure" unit tests, which test most of the logic, computations and intention in nodejs, then rely on (usually just a few) E2E tests in selenium or whatever to make sure stuff actually work in the browser.
For example, in a standard React/Redux app with low amounts of legacy code, you can test almost all of the app's constructs in node and be very confident that everything works.
There's still a few places where Karma + Browser shine. Namely when something requires a unit test-style environment but is integration heavy. Think libraries abstracting browser details such as a rich text editor or a library like jQuery.
Re: Headless mode in Firefox
#153Re: Headless mode in Firefox
#154For 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…
> headless mode with a customer launcher Where does one find a customer launcher?
Re: Headless mode in Firefox
#155Earlier quoted context omitted.
Only versions 1.4 and below. Versions 1.5 and above do not require an X server. Version 1.5 has been available for 5+ years: https://ariya.io/2012/03/pure-headless-phantomjs-no-x11-or-x...
We have found PhantomJS to be very buggy and hard to debug. We generate millions of PDFs a month. Whenever we upgrade PhantomJS, something breaks with no way to debug easily. We end up reverting to the older version. After trying 3 times, we gave up and had settled for the older version.
Does not play well with React Fiber either, in my experience. Aaaand isn't the brain behind PhantomJS stepping down or something? To any potential users: just go with Chrome
Re: Headless mode in Firefox
#156Earlier quoted context omitted.
> headless mode with a customer launcher Where does one find a customer launcher?
OP means custom launcher.
Thank you for your helpfulness, regardless.
Re: Headless mode in Firefox
#157Has anyone built a WaaS yet ? (Web-browser as a service.)
Re: Headless mode in Firefox
#158Has anyone built a WaaS yet ? (Web-browser as a service.)
I think if done right there would be a market (if this is actually the right direction and useful is another question). wbaas.io "web browser as a service" Support like say the 5 major browsers (Firefox, Chrome, Safari, ...), provide an API and charge like ~xx euro/month. The biggest challenge is probably to make it secure as one builds in essence a DOS proxy?
We secure all VMs with a firewall, every test runs on a new VM which gets destroyed after the test.
Re: Headless mode in Firefox
#159Earlier quoted context omitted.
Like that, but with documentation.
and that actually works. Using headless chrome with the direct API is so much more reliable than the selenium API.
Re: Headless mode in Firefox
#160Earlier quoted context omitted.
No it isn't, the URL is unreliable source of truth with Unicode spoofing attacks and things like that. Safari only shows the domain at this point; the URL is an unimportant implementation detail.
How would you differentiate say: " http://googlemail.buyviagra.com" From: " https://mail.google.com" If they looked the same.