Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 2293
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: jml39 [...] optonline.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.37
Fixed in: (no value)



Subject: Unable to mechanize page with no forms
A page I'm trying to automate (www.gotomypc.com) has several text fields and a submit button, but no forms! The Mechanize module dies at line 351, where you look for the current form without allowing for a 0 form. Perhaps you can look for the fields on a page outside of a form if the form number is 0. I'm running ActiveState Perl Build 23:15:13 on Windows NT
Date: Wed, 26 Mar 2003 12:09:02 -0600
From: Andy Lester <andy [...] petdance.com>
To: Guest via RT <bug-WWW-Mechanize [...] rt.cpan.org>
Subject: Re: [cpan #2293] Unable to mechanize page with no forms
RT-Send-Cc:
This is a bummer. You should still be able to follow links, even without forms. I'll see what I can do. Thanks, Andy -- 'Andy Lester andy@petdance.com Programmer/author petdance.com Daddy parsley.org/quinn Jk'=~/.+/s;print((split//,$&) [unpack'C*',"n2]3%+>\"34.'%&.'^%4+!o.'"])
Interesting. The home page DOES have one form on it.
Your fetch of the page is failing. Try running the following and take a look at the Dumper dump of the response. #!/usr/bin/perl -w use strict; use Data::Dumper; use WWW::Mechanize; my $url = "http://www.gotomypc.com/"; my $agent = WWW::Mechanize->new(); my $response = $agent->get($url); print Dumper( $response ), "\n"; my $found_uri = $agent->uri(); print "$found_uri found\n"; $agent->form_number(1) or $agent->form_name("LogIn") or die "Form not found"