Live data from Hacker News

PhantomJS 2.0 is getting ready for release

github.com

21–25 of 25 posts

Re: PhantomJS 2.0 is getting ready for release

#21
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

#22

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.

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

#24

Earlier quoted context omitted.

I have solved this problem by using SlimerJS as an alternative.

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")

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

#25

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.

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.

Post reply on HN