News for hackers. Stuff that matters.
Re:PhantomJS 2.0 is getting ready for release by untog on Monday January 26, 2015 @12:49PM (#8948364)
Great news! I use PhantomJS, and I'm going to use this Hacker News thread as a really thinly veiled attempt at advertising my startup!

We use PhantomJS as a headless browser, sometimes taking screenshots. I know, crazy. Anyway: http://www.mystartup.com

Re:PhantomJS 2.0 is getting ready for release by seanp2k2 on Monday January 26, 2015 @01:52PM (#8948764)
Re:PhantomJS 2.0 is getting ready for release by jwklemm on Monday January 26, 2015 @01:35PM (#8948661)
Very nice! I've been using PhantomJS 2.0 for a while now at my automated browser testing startup: https://ghostinspector.com/ (It's been available to build from source for a couple months.)

It has a few lingering bugs (for instance, some issues with file uploads), but overall, it's a nice improvement over 1.9.x. The JavaScript engine is much newer and the rendering is improved.

Re:PhantomJS 2.0 is getting ready for release by edwinnathaniel on Monday January 26, 2015 @12:32PM (#8948281)
Excellent news.

We, AppNeta, use PhantomJS to perform Synthetic web-app monitoring

http://www.appneta.com/products/appview/

While PhantomJS has some limitation here and there, it is the _only_ headless browser our there AFAIK.

Disclaimer: I work for AppNeta (specifically for the AppView product).

Re:PhantomJS 2.0 is getting ready for release by mofle on Monday January 26, 2015 @12:46PM (#8948345)
Happy to see this! We use PhantomJS in our CLI tool Pageres, but the fact that the bundled WebKit engine in PhantomJS 1.x is ancient has caused a lot of headake for us and our users.

https://github.com/sindresorhus/pageres

Re:PhantomJS 2.0 is getting ready for release by josephmecham on Monday January 26, 2015 @11:41AM (#8947916)
Excellent! I have used PhantomJS for web scraping but as that is always a gray area of legality. I'd love to hear any other major uses you've seen it used for. I always love it when I find that a tool I'm using can be used for other purposes.
Re:PhantomJS 2.0 is getting ready for release by CJefferson on Monday January 26, 2015 @12:23PM (#8948221)
I use it to print out HTML presentations. I did found some very annoying bugs in saving to PDF (I'll have to see if they have got fixed!), but this is the only (scriptable) way I know of saving each slide of a HTML presentation to PDF (which you need sometimes)
Re:PhantomJS 2.0 is getting ready for release by veidr on Monday January 26, 2015 @09:11PM (#8950905)
I used PhantomJS to drive a system integration with a hostile legacy web application.

By hostile I mean that the legacy system had no API, was implemented using obfuscated code, and resisted being driven by URLs.

We needed to integrate with it to create documents, calendar appointments, etc. in the legacy system, based on stuff that was happening in the newer system we were building.

We ended up using PhantomJS to implement a module that drove the legacy system via its HTML user interface -- pushing buttons, selecting meeting participants from the HTML select tags, submitting forms, etc.

Although that sounds (and is!) hacky as hell, it worked flawlessly 100% of the time. PhantomJS was a gift from the gods.

Re:PhantomJS 2.0 is getting ready for release by weego on Monday January 26, 2015 @12:09PM (#8948106)
Primarily scraping of comet/ajax updating sites of course, but also some interesting uses for testing - crawling a site taking screenshots and then comparing screenshots across releases looking for layout bugs was quite a fun thing. The same principle as https://github.com/BBC-News/wraith
Re:PhantomJS 2.0 is getting ready for release by pothibo on Monday January 26, 2015 @12:08PM (#8948099)
I once wanted to do automated testing with it. But because PhantomJS used an old webkit version, I couldn't :(

But that's one use case where I would love to use phantomJS or any other headless engine to test the frontend. I'm aware that for headless testing to work, there should be a headless browser of every major vendor. Maybe it's an utopia.

Re:PhantomJS 2.0 is getting ready for release by jamespitts on Monday January 26, 2015 @12:27PM (#8948247)
I've been using jquerygo (which runs on phantomjs) to do automated UI testing. The familiar jquery selectors are convenient!

Being able to use websockets in my automated testing has been something of a holy grail, so jquerygo and phantomjs have been hugely helpful.

https://github.com/travist/jquery.go.js

Re:PhantomJS 2.0 is getting ready for release by serve_yay on Monday January 26, 2015 @12:13PM (#8948136)
Yes, my team ran directly into the old webkit version issue as well. Does this 2.0 still use an old WebKit? Having trouble finding out...

Edit: it appears to be WebKit 538.1, from May 2014. But this is based on a readme which is pretty old, so it could be outdated info

Re:PhantomJS 2.0 is getting ready for release by pothibo on Monday January 26, 2015 @12:17PM (#8948171)
It uses a new version of Webkit(That includes DOM Mutation Events IIRC). But I believe that they always ship with their own version of webkit, which will always be behind.

For PhantomJS 2.0, I think they ship with a version of webkit that is > 6 months old.

Re:PhantomJS 2.0 is getting ready for release by warfangle on Monday January 26, 2015 @12:18PM (#8948189)
They don't ship with their own version of webkit; they use qtwebkit (or at least used to?).
Re:PhantomJS 2.0 is getting ready for release by simlevesque on Monday January 26, 2015 @12:17PM (#8948170)
I have solved this problem by using SlimerJS as an alternative.
Re:PhantomJS 2.0 is getting ready for release by serve_yay on Monday January 26, 2015 @12:27PM (#8948246)
Yeah, unfortunately we can't install that one on our build box, I believe because it needs X11. (As the page says it is not "totally headless")
Re:PhantomJS 2.0 is getting ready for release by simlevesque on Monday January 26, 2015 @02:02PM (#8948835)
You are mistaken. You can install SlimerJS on a box without X11. You must install Xvfb use it like this : xvfb-run slimerjs script.js

If you use casperjs you can modify the executable (it's python) and change "'default_exec' : 'slimerjs'" into "'default_exec' : 'xvfb-run slimerjs'"

Re:PhantomJS 2.0 is getting ready for release by greensoap on Monday January 26, 2015 @12:18PM (#8948187)
I use it to let my linux-based custom digital picture frame automatically pull photos from my IOS photostream. This is insecure because it requires that my photos are temporarily public, but it gets the job done.
Re:PhantomJS 2.0 is getting ready for release by hedgehog on Monday January 26, 2015 @01:37PM (#8948671)
Baking SVGs into PNGs for attaching to e-mails. We used D3 to generate SVG charts for displaying analytics data in-browser and then use Phantom to generate PNG versions. Works well.
Re:PhantomJS 2.0 is getting ready for release by yeldarb on Monday January 26, 2015 @01:00PM (#8948441)
We use it to generate screenshots to use as the images in our open graph tags.
Re:PhantomJS 2.0 is getting ready for release by freshyill on Monday January 26, 2015 @12:50PM (#8948374)
The current release has no (very very limited?) flexbox support, making PhantomJS less and less useful for working with modern layouts. I'm very excited about this release.
Re:PhantomJS 2.0 is getting ready for release by Ronsenshi on Monday January 26, 2015 @12:56PM (#8948424)
That's great. Couple of things that I had to battle with in the past should be fixed in 2.0, so - awesome news.
Re:PhantomJS 2.0 is getting ready for release by kyledrake on Monday January 26, 2015 @12:12PM (#8948129)
PhantomJS is amazing. We use it to take screenshots of web sites on Neocities: https://neocities.org/browse
Re:PhantomJS 2.0 is getting ready for release by chedigitz on Monday January 26, 2015 @12:20PM (#8948208)
Same here! It's saved us a tremendous amount of time for screenshots, especially when dealing with different sized viewports. Happy to see CSS3 is supported in 2.0 :)

A big thanks to PhantomJS devs!