views:

62

answers:

2

I would like to generate HTML Snapshots using Watir, hosted on Heroku.

Google's Full Specification for Making AJAX Applications Crawlable suggests using HTMLUnit... see How do I create an HTML snapshot? point #3.

HtmlUnit is a Java-only headless browser emulator; and unfortunately jRuby is not an option on Heroku. So HtmlUnit is ruled out (to my knowledge).

If you're interested I have another question open regarding HtmlUnit as a service hosted on Google App Engine... Making AJAX Applications Crawlable? How to build a simple web service on Google App Engine to produce HTML Snapshots? ... still waiting on a proven example/answer.

A: 

Maybe you can use iMacros for Firefox instead? It can by run via the command line and take complete web page screenshots.

SamMeiers
The Snapshots I'm referring to are actually the source code (after js has manipulated to DOM)... Not images.
Chris Jacob
A: 

No. You need a full desktop environment to run watir. Heroku doesn't provide you with that.

You could use a service such as Amazon EC2 to boot up a full image and run it there.

troelskn