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, <[email protected]> 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
> [email protected]
> ________All mammals learn by playing.
>
>
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
>     POST TO: [email protected]
> 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. -
_____________________________________________________________
Seattle Perl Users Group Mailing List
     POST TO: [email protected]
SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
    MEETINGS: 3rd Tuesdays
    WEB PAGE: http://seattleperl.org/

Reply via email to