[ale] CLI way to interact with JavaScript URL?

Brian Pitts brian at polibyte.com
Tue Dec 2 20:35:29 EST 2008


> OK it's been about 3 years since I last looked into this.   Back then
> the answer seemed to be there wasn't a way to do it with tools like
> lynx, curl and wget or any other CLI browser.

You can use Watir [0] to automate Firefox (or IE or Safari), which
obviously have javascript interpreters. Here is some sample code
interacting with a page and invoking javascript. [1] There's a
reimplementation of Watir called Celerity [2] which uses the HtmlUnit
library instead of a web browser; HtmlUnit claims to have good
javascript support. The scRUBYt! web-scraping framework also has an
alternative implementation called firescRUBYt that uses Watir as the
backend. [3]

[0] http://wtr.rubyforge.org/
[1] http://wiki.seleniumhq.org/display/WTR/Simple+Ajax+examples
[2] http://celerity.rubyforge.org/
[3] http://scrubyt.org/

-Brian


More information about the Ale mailing list