Form submit with mechanize 0.72

Discussion in 'Perl Misc' started by Cashbackre, Feb 23, 2008.

  1. Cashbackre

    Cashbackre Guest

    I am currently using mechanize 0.72 on active perl 5.8.6 for some
    strange reason I cannot upgrade to the current version
    of 1.34 so this is not an option, the problem is I am trying to submit
    my login details on a page with two forms
    with the same name but different values, I am trying to submit to the
    second form with relevant form html:
    <input type=submit name=submit value=" S E N D ">,
    I understand mechanize 1.34 has a click_button function, whereby I can
    click by value, however 0.72 does not have the click_button function,
    I can fill in my username and password, and check that they have been
    filled in correctly but every submission of the form either via
    $mech->click("submit");
    or $mech->submit();
    or $mech->submit("submit");
    ends up submitting the very first form
    Cashbackre, Feb 23, 2008
    #1
    1. Advertising

  2. Cashbackre

    J. Gleixner Guest

    Cashbackre wrote:
    > I am currently using mechanize 0.72 on active perl 5.8.6 for some
    > strange reason I cannot upgrade to the current version
    > of 1.34 so this is not an option, the problem is I am trying to submit
    > my login details on a page with two forms
    > with the same name but different values, I am trying to submit to the
    > second form with relevant form html:
    > <input type=submit name=submit value=" S E N D ">,
    > I understand mechanize 1.34 has a click_button function, whereby I can
    > click by value, however 0.72 does not have the click_button function,
    > I can fill in my username and password, and check that they have been
    > filled in correctly but every submission of the form either via
    > $mech->click("submit");
    > or $mech->submit();
    > or $mech->submit("submit");
    > ends up submitting the very first form


    The place to start is with the documentation.

    Is there a 'form_number' attribute for the submit or
    submit_form method?
    J. Gleixner, Feb 25, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian D
    Replies:
    1
    Views:
    407
    Brian D
    Dec 24, 2009
  2. ken
    Replies:
    0
    Views:
    1,121
  3. Li Chen
    Replies:
    1
    Views:
    141
    Damjan Rems
    Sep 14, 2008
  4. Angus Guan
    Replies:
    0
    Views:
    142
    Angus Guan
    Dec 8, 2008
  5. Replies:
    3
    Views:
    662
Loading...

Share This Page