[Israel.pm] web automation

Issac Goldstand margol at beamartyr.net
Mon Feb 7 12:52:07 PST 2005


----- Original Message ----- 
From: "Gabor Szabo" <gabor at perl.org.il>
To: "Perl in Israel" <perl at perl.org.il>
Sent: Monday, February 07, 2005 10:30 PM
Subject: Re: [Israel.pm] web automation


>
> That would require a JavaScript interepreter in your script.
> If you came to our last meeting you'd know about this as peopl
> were discussing exactly that.
>
> You can try to use Win32::IE::Mechanize or can try to setup
> a Javascript Interpreter. That would make a nice CPAN module

Such a module exists (kinda).  JavaScript::SpiderMonkey.  The problem is 
that much web-based javascript does something to the widgets provided by the 
browser, or to the current DOM, which aren't necessarily provided by 
Mecahnize modules (maybe Win32::IE::Mechanize is different - never touched 
it and I'm too busy trying to actually finish my YAPC talk to look now).

Sometimes javascript does other cool things, though, like setting a value 
based on other values.  I wrote my own version of JavaScript::SpiderMonkey a 
while back which allowed you to pass variables from the JS interpreter back 
to Perl-land (I sent patches to JS::SM, but I don't think they were ever 
brought in) which would help in this latter case...

  Yitzchak




More information about the Perl mailing list