Live data from Hacker News

Chrome 59 has cross-platform headless support

chromestatus.com

31–40 of 161 posts

Re: Chrome 59 has cross-platform headless support

#32
post #6

Any way of scripting this to automate button clicks etc? I use PhantomJS for this now but found it to be incredibly unstable for complex pages.

If you're using Go, you might want to check out https://github.com/knq/chromedp ... There is also a similar package for NodeJS. Otherwise, you can use Selenium in other languages.

Re: Chrome 59 has cross-platform headless support

#33

Earlier quoted context omitted.

> FWIW, you can do that now, using phantomjs (which is chrome) http://phantomjs.org/screen-capture.html It's based on webkit.

Once upon a time, but not anymore. https://www.chromium.org/blink

PhantomJS is based on webkit (and an outdated version IIRC + a shitty JS interpreter)

Re: Chrome 59 has cross-platform headless support

#34

This is fantastic. I'm using a combination of Chrome and PhantomJS for karma testing right now, for https://github.com/paypal/paypal-checkout and https://github.com/krakenjs/xcomponent . There are hundreds of tests opening up hundreds of iframes and popup windows, and sending a lot of cross-window messages, and that ends up being really memory hungry. Chrome deals pretty well with garbage collection, so long as I'm c…

What do you do to ensure the resources for closed windows are released?

Re: Chrome 59 has cross-platform headless support

#35
https://bitbucket.org/lindenlab/dullahan

I've been working on a fully open source Windows/macOS library (via Chromium Embedded Framework) that allows you to render pages to memory (and then of course to bitmaps, textures etc.) as well as inject synthesized mouse/keyboard/JavaScript events. It currently uses (what amounts to) Chrome 57.

Looks like this might make my project obsolete.

Re: Chrome 59 has cross-platform headless support

#37

Please let this be capable of generating PDFs from HTML from the command line.

If you're willing to wait until Electron releases a Chrome 59 -based build, I'll be updating https://github.com/mixu/electroshot which handles screenshots and print-to-PDF along with a bunch of other niceties.

Re: Chrome 59 has cross-platform headless support

#38
post #14

Any chance for webgl here? Would be nice for automatic screenshots and webgl tests.

WebGL is supposedly a first class citizen of the browser and is used in a ton of pages, but it gets left out or deferred in many tooling packages. There are many tools that are nearly useless to us because they don't support WebGL. It's disappointing.

Re: Chrome 59 has cross-platform headless support

#39
I've been trying to test audio and video with headless browsers (namely PhantomJS) but have experienced extreme difficulty, I wonder if headless Chrome is able to support/supports already HTMLAudioElement or HTMLVideoElement or any media interface that would make, for example, testing YouTube or SoundCloud embeds easier.

Re: Chrome 59 has cross-platform headless support

#40

This is fantastic. I'm using a combination of Chrome and PhantomJS for karma testing right now, for https://github.com/paypal/paypal-checkout and https://github.com/krakenjs/xcomponent . There are hundreds of tests opening up hundreds of iframes and popup windows, and sending a lot of cross-window messages, and that ends up being really memory hungry. Chrome deals pretty well with garbage collection, so long as I'm c…

We also did a POC with PhantomJS and found similar issues, as well as generally flakiness causing too many false negatives. Ended up not using it; I'm hoping this can simplify things are give something more solid to build on.
Post reply on HN