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

michaelrwolf at att.net michaelrwolf at att.net
Fri Feb 24 11:38:28 PST 2012


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/spug-list/attachments/20120224/2cdb5b15/attachment.html>


More information about the spug-list mailing list