SPUG: programmatically managing cookies

Eric chesseditor at yahoo.com
Fri Jan 9 18:45:11 PST 2009


Does anyone know of a web page somewhere that compares the capabilities of all the perl modules for http? 
I'd love to know the relative strengths and weaknesses of
Net:HTTP, LWP, WWW::Mechanize and any other ones I don't know about. 

Eric Harman
QA Engineer


--- On Fri, 1/9/09, Adam Monsen <haircut at gmail.com> wrote:

> From: Adam Monsen <haircut at gmail.com>
> Subject: Re: SPUG: programmatically managing cookies
> To: "Spug-list" <spug-list at pm.org>
> Date: Friday, January 9, 2009, 1:54 PM
> On Fri, Jan 9, 2009 at 12:45 PM, Joel Grow wrote:
> > I'd like to programmatically access a
> password-protected site.  When I GET
> > the url, I receive back HTML with a javascript relay
> to a login page, and a
> > cookie.  I do have credentials for the site.  So I can
> POST my
> > username/password to the login page, but I need to
> manage the cookie the
> > site sets so that I can then be forwarded to the
> password-protected area.
> > Before I dive too deeply into this, does anyone have
> advice/pointers on the
> > best way to manage this?
> 
> I'm a fan of WWW::Mechanize, but apparently it
> can't do JavaScript
> besides window.open().
> 
> Some ideas:
> * add a JavaScript interpreter to WWW::Mechanize
> * use Selenium RC and Perl client driver
> * the Ruby version of WWW::Mechanize might support
> JavaScript, I'm not sure
> 
> Out of those, I know that Selenium can handle JavaScript
> since it
> drives a bona fide Web browser. Also, you can prototype
> your Web
> actions (with record/playback) in the Selenium IDE.
> 
> I recently gave a talk on Selenium. Slides are available,
> if you're
> interested: http://adammonsen.com/talks . The examples are
> in Python,
> but there's really nothing fancy--they should be easily
> portable to
> Perl.
> 
> -- 
> Adam Monsen
> _____________________________________________________________
> 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/


      


More information about the spug-list mailing list