Earlier 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.
Headless mode in Firefox
71–80 of 191 posts
Re: Headless mode in Firefox
#72Earlier quoted context omitted.
Does this offer any real benefit over Xvfb?
We were using Xvfb with PhantomJS. Moving to a headless browser gave us the advantage of making sure everything is rendering just as we see in the GUI mode of that browser. This had a lot to do with moving away from PhantomJS. But it also removed the unkowns, Xvfb and other dependencies that came with it, from our stack. The lesser the unkowns the better I guess.
Re: Headless mode in Firefox
#73Can 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
#74Earlier quoted context omitted.
We were using Xvfb with PhantomJS. Moving to a headless browser gave us the advantage of making sure everything is rendering just as we see in the GUI mode of that browser. This had a lot to do with moving away from PhantomJS. But it also removed the unkowns, Xvfb and other dependencies that came with it, from our stack. The lesser the unkowns the better I guess.
Wait, why did you need to use XVFB with PhantomJS? Isn't Phantom headless as is?
Re: Headless mode in Firefox
#75Can you tell Firefox to print in headless mode? I want to write reports using HTML and JS, but printing is always an issue.
One word -- wkhtmltopdf
Re: Headless mode in Firefox
#76Earlier quoted context omitted.
Wow - thanks for posting that: could come in handy on the project I'm currently working on!
We're using Chrome Headless inside Docker to produce thousands of PDF reports from an Angular/D3 web app. It works very well, but there are some gotchas with regard to the Chrome Remoting Interface.
Re: Headless mode in Firefox
#77Re: Headless mode in Firefox
#78Earlier quoted context omitted.
I'm currently evaluating testcafe which is pretty nice, and headless chrome was easy to setup. I'm interested to see what people recommend for browser testing, I'm also using preact.
Writing end-to-end tests is always a sucky and flaky experience, and it always ends up slowing down CI. With that said, I've used testcafe without any big complaints. My general rule of thumb is to try having as few end-to-end tests as possible. It's fine for an e2e test to cover multiple aspects of your application. Trying to write e2e tests as if they were unit tests just leads to sadness and infinite CI builds. I…
Testing everything in a browser/e2e provides a rather poor cost/benefit ratio, especially as the project grows and more features and tests are added, so it should be reserved for cases where it is really important.
I like having e2e tests that cover the very core functionality and involve multiple parts of the stack. For example, if you have your rather typical app with a login modal, it's probably good to have a test that clicks on the button, makes sure that the modal is visible, and the user is redirected to the expected page after logging in. But testing if error message is displayed if email address is invalid? That's too much.
Re: Headless mode in Firefox
#79Earlier quoted context omitted.
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.
Doesn't xvfb still just run an Xserver, simply without painting? Or do headless Chrome and Firefox still require an X server running too?
I meant equivalent from the point of view of the user who wants to run tests, not on the way they work internally.
Re: Headless mode in Firefox
#80Earlier 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.