http://qs1969.pair.com?node_id=546625

perlknight has asked for the wisdom of the Perl Monks concerning the following question:

All, I am trying to automate upload of pics to "http://www1.snapfish.com/welcomenphu". But I am having issue with javascript. First cut at automating the login with web mechanize:
use WWW::Mechanize; #use HTML::TokenParser; my $agent = WWW::Mechanize->new; $agent->get("http://www1.snapfish.com/welcomenphu"); $agent->form("form1"); $agent->field("emailaddress","me@mykingdom"); $agent->field("password","123"); $agent->click(); print "$agent->{content}";
The next page, if I login successfully will have my photo album dir. However, this is not the case; I dump out the output in html format and used firefox to view it. It prompts me that the account already exists and asked if I want to create another account or click the login button. When I click on the login button, it brings me to the page where my album dir is located. I am thinking it's a javascript issue. Any idea? Thanks.