PhantomJS 1.5 released (headless WebKit with JavaScript API)
code.google.com
code.google.com
This makes it the first modern browser replacement for our old moz-headless-screenshot branch, which is effectively Firefox 3.6. It's really a shame no-one's picked up that work for modern FF builds. Couldn't even find someone to hire for it...
With browsers, it's commonly used to programmatically take screenshots of web sites.
"completely headless" - Xvfb is also not required.
So sad to hear this. That was my main motivation for using PhantomJS. Fortunately 1.4 still supports it.
Then, of course, there's also this:
Issues are reported but nobody volunteers to analyze or fix themTo make a comparison for our heavy Selenium use, I can't clearly see what is lacking in PhantomJS that would be a show stopper.
Does anybody know if other than lack of Flash support, it covers all aspects of what the end user would experience ?
For everything other than that, though, PhantomJS is fantastic. It's infinitely more pleasant to deal with than Selenium.
CasperJS is built on top of PhantomJS and adds some cool assertions: http://casperjs.org/
In addition to running library unit tests in a 'real' browser environment it can also be used to test apis and visual components, and then save results as files and screenshots for use with other systems such as Hudson.
I use it extensively for our web app build and test cycle at work (Causata.com) and to save time for anyone interested in rolling their own have made the code available on Github at https://github.com/metafeather/phantomjs-yuitest
I've used it to allow modern applications to interface with legacy systems that have no mechanism of extension, and no API other than their web interfaces. Just about anything you can control via a web interface, you (or your software) can control using PhantomJS.
The system does not work well with iPads, which were being deployed to sales. A new modern iPad-savvy reporting UI for sales staff was wanted, but the data had to end up in the legacy system during the multi-year transition that would phase it out.
We wrote a Rails app for the backend, and a native iOS client that ran on the iPads. Real straightfoward, the client app sends JSON to the rails backend. Upon submission of a report, the rails app then used PhantomJS to log into the legacy system as the user in question, navigate throught the multiple-page process, manipulating the popups and checkboxes and textfields, and input the data into the legacy system just as if the user had sat down at a PC and done it themselves.
Kludgetastic, definitely, but without something like PhantomJS there'd be no way at all to get data into this legacy system programatically.
For the superior completely headless qualities? There was a post on HN almost 400 days ago where someone claimed wkhtmltopdf's PDF output quality was superior to phantomjs - anyone know if that's changed with this release?
http://code.google.com/p/phantomjs/wiki/ReleaseNotes
Search for "rasterization"
I think it ay be possible but wanted to know for sure.
Is there a minimal program available that shows this interaction?
I'm sorry to not have a separate websockets-example, but there's really nothing special in using websockets with phantom.