4 ms·
Also note these other headless javascript testing frameworks: Zombie.js: http://news.ycombinator.com/item?id=2038663 http://news.ycombinator.com/item?id=203866
by ehsanul 16y ago
Also note these other headless javascript testing frameworks:
Zombie.js: http://news.ycombinator.com/item?id=2038663 http://news.ycombinator.com/item?id=2038663
HTMLUnit: http://htmlunit.sourceforge.net/ http://htmlunit.sourceforge.net/
Celerity (JRuby wrapper around HTMLUnit): http://celerity.rubyforge.org/ http://celerity.rubyforge.org/
- xtacy 16y agoI think the main differentiating factor between phantomjs and the above mentioned ones is that phantomjs actually uses WebKit and has full support for everything that WebKit supports. Zombie.js uses the DOM API due to jsdom, which might have its own parsing intricacies.
- regularfry 16y agoHTMLUnit has its own share of parsing gotchas. I've used Selenium with Firefox and Xvfb to do headless scraping in the past; looks like my toolkit just got simpler.
- endtime 16y agoI don't know that any of those support SVG. If you want to render e.g. Raphael.JS drawings on the server, headless JS with SVG DOM support is pretty useful.
- Torn 16y agoThat actually sounds like a really neat idea - throwing together a PhantomJS script that scrapes the content of a particular div containing Raphael or Flot and then renders as png.
- endtime 16y agoYeah, we're doing it with wkhtmltoimage right now, which works but makes me cringe every time I think about it.