in reply to Win32::IE::Mechanize trouble

Check if $ie->form_name(...) is returning undef. That indicates that the form wasn't found and would explain the error message you are getting.

As for the button, what kind of form control is it, a <button> or <input type=submit ...> or an anchor that executes javascript?

I would see if the $ie->click(...) or $ie->submit(...) will work for you.

Replies are listed 'Best First'.
Re^2: Win32::IE::Mechanize trouble
by xgamma (Novice) on Jun 19, 2008 at 19:38 UTC
    How would I go about finding out if it's undefined?

    It's a button

    <span class="button"><a href="javascript:clickedButton('submitLogin'); +"> <img xmlns="http://www.w3.org/1999/xhtml" title="" src="en/images/lan +guage_sensitive_images/pagegraphics/buttons/image/go.gif" class="" al +t=""/> </a></span>
        So I added this line:

        print "works" if defined $ie->form_name( $formName );
        Since nothing gets printed, this means that my form isn't getting set correctly, right?
      No, it's an anchor that executes javascript. You need to follow the link.
      The button is an anchor which calls the JS routine clickedButton(). You'll just have to look at the JS code to see what really is going on.