SPUG: Beyond WWW::Mechanize (i.e. AJAX)

Craig Steffler seaperldev at gmail.com
Fri Feb 24 11:46:00 PST 2012

Actually, if I'm not mistaken I think Mechanize does handle Javascript. Try
WWW::Mechanize::Shell as it lets you interact directly.
If that doesn't work I'd look into Expect as a fall back.

On Fri, Feb 24, 2012 at 11:38 AM, <michaelrwolf at att.net> wrote:

> I've been a very satisfied user of Mech for years (Thanks Andy - it's a
> great example of good interface design, and thus a highly usable module)...
> but alas, as my web scraping code evolved to 'button-pushing-mode' it turns
> out that the submit button does *not* submit a HTTP request, but rather
> invokes an AJAX-ish operation
>     <form onsubmit='A.B.C.yada_yada(this); return false;" ...>
>         <input .../>
>         <input .../>
>         <input type="submit" value="1-click yada yada"/>
>     </form>
> I *can* fill in the form and click() the button, but since Mech doesn't do
> JavaScript, I'm up the proverbial creek.
> What's a Mech fan to do?
>  * For real in production?
>  * For mock in testing?
> Michael R. Wolf
> ____MichaelRWolf at att.net
> ________All mammals learn by playing.
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
>     POST TO: spug-list at pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
>    MEETINGS: 3rd Tuesdays
>    WEB PAGE: http://seattleperl.org/

Craig Steffler
Sr. Software Engineer - Perl/Ruby on Rails/PHP

- There are only 10 types of people in the world: those that understand
binary and those that don’t. -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/spug-list/attachments/20120224/cadd108f/attachment.html>

More information about the spug-list mailing list