| Darrell Gammill 2006-03-08, 7:59 am |
| The 'Anthropology' option is being interpreted as its own separate input
rather then part of the 'u_input' input. To test this, I used the
section of code below with the results right after it.
-Dgg
taos1:/export/home/darrell/TestArea >cat test_mech.pl
#!/usr/bin/perl -w
use WWW::Mechanize;
use Data::Dumper;
my $mech = WWW::Mechanize->new();
$mech->get("http://lca.lehman.cuny.edu/dept/registrar/schedule/coursefin
der.asp");
my $form = $mech->form_number(1);
my @Inputs = $form->inputs;
foreach my $Input (@Inputs) {
next if ( ! $Input->isa('HTML::Form::ListInput') );
my $Name = $Input->name;
print "\n For the input of '$Name' I can use the following:\n";
print join ("\n", $Input->possible_values), "\n";
}
taos1:/export/home/darrell/TestArea >perl test_mech.pl
For the input of 'term' I can use the following:
FAL04CRS
For the input of 'division' I can use the following:
D
G
For the input of 'u_input' I can use the following:
-Choose a Department-
ADPIBA
AMS
ARHART
BIO
BLS
CHE
CHC
ECO
DECECEEDCEDEBBE
ESCBUS
EBSEDGEDREDSESSFCS
ENGENW
ESL
GEHGEOGEP
LEH
DFNHEAHSAHSDREC
HIAHIEHISHIUHIW
HUM
IAS
ACUFREIDWITAJALLATRUSSPA
LACPRS
LSP
LNG
COMMLJ
CGICISCMPMAT
MSHMSPMST
HINNUR
ON%OA%
PHI
ASTPHY
POLSPS
PSY
SOCSWK
SPESPV
DNCTHE
WST
%W
REV
For the input of 'Anthropology' I can use the following:
ANT
For the input of 'sortby' I can use the following:
Disc, Coursenum, Section
Day, Firsthour, Firstmin
Code
Coursenum
Section
Instructor
For the input of 'order' I can use the following:
ASC
DESC
-----Original Message-----
From: Gisle Aas [mailto:gisle@ActiveState.com]
Sent: Wednesday, June 02, 2004 5:11 PM
To: hescobar@travelone.net
Cc: bedouglas@earthlink.net; libwww@perl.org;
Perl-Win32-Users@listserv.ActiveState.com
Subject: Re: :mechanize issues/mechanize.pm dies!!
"Darrell Gammill" <darrell@sirsi.com> writes:
> Look back a the output of 'print $b->current_form()->dump();' Do you
> see where the option for 'Anthropology' appears by itself? This is
> because the HTML is not being parsed right. The following line seems
to
> be the offender:
>
> <option value="ANT"
> Name="Anthropology">Anthropology</option>
>
> The 'Name' attribute seems to be confusing the form parser so
> Anthropology is not one of the available options.
I don't believe that this can confuse HTML::Form. It does not care
about the Name attribute at all. Care to explain better what you
think happens here?
Regards,
Gisle Aas
________________________________________
_______
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
|