Actually, if I'm not mistaken I think Mechanize does handle Javascript. Try WWW::Mechanize::Shell as it lets you interact directly.<br>If that doesn't work I'd look into Expect as a fall back.<br><br><div class="gmail_quote">
On Fri, Feb 24, 2012 at 11:38 AM,  <span dir="ltr"><<a href="mailto:michaelrwolf@att.net">michaelrwolf@att.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div style="font-family:Courier New,courier,monaco,monospace,sans-serif;font-size:12pt">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<br>
<br>    <form onsubmit='A.B.C.yada_yada(this); return false;" ...><br>        <input .../><br>        <input .../><br>        <input type="submit" value="1-click yada yada"/><br>
    </form><br><div><br>I *can* fill in the form and click() the button, but since Mech doesn't do JavaScript, I'm up the
 proverbial creek.  <br><br>What's a Mech fan to do?<br> * For real in production?<br> * For mock in testing?<br><br></div><font color="#888888">Michael R. Wolf<br>____<a href="mailto:MichaelRWolf@att.net" target="_blank">MichaelRWolf@att.net</a><br>
________All mammals learn by playing.<div><br></div>



</font></div></div><br>_____________________________________________________________<br>
Seattle Perl Users Group Mailing List<br>
     POST TO: <a href="mailto:spug-list@pm.org">spug-list@pm.org</a><br>
SUBSCRIPTION: <a href="http://mail.pm.org/mailman/listinfo/spug-list" target="_blank">http://mail.pm.org/mailman/listinfo/spug-list</a><br>
    MEETINGS: 3rd Tuesdays<br>
    WEB PAGE: <a href="http://seattleperl.org/" target="_blank">http://seattleperl.org/</a><br></blockquote></div><br><br clear="all"><br>-- <br>Craig Steffler<br>Sr. Software Engineer - Perl/Ruby on Rails/PHP<br><br><font size="1">- There are only 10 types of people in the world: those that understand binary and those that don’t. -</font><br>
<br>