in reply to Re: mechanize accessing a listbox
in thread mechanize accessing a listbox

Thanks for the hint. Big help! While trying the above i get an error of: Can't call method "value" on an undefined value at /Library/Perl/5.8.6/WWW/Mechanize.pm line 1137. Any ideas what this may be? Looking at the Mechanize.pm code: my $form = $self->{form}; if ($number > 1) { $form->find_input($name, undef, $number)->value($value); } else { if ( ref($value) eq 'ARRAY' ) { $form->param($name, $value); } else { $form->value($name => $value); } } } Respecfully yours, Thelma Vance, thelma1944@netzero.com

Replies are listed 'Best First'.
Re: more on mechanize accessing a listbox
by jettero (Monsignor) on Dec 14, 2006 at 12:29 UTC
    [editorial note: please use the <code> tags...]

    ...looks like Mechanize is calling value() on an undefined value. At a guess, you apparently didn't get the site: $mech->get($url). You have to get() before you can start interacting with it.

    -Paul