in reply to Re: Click button with WWW::Mechanize
in thread Click button with WWW::Mechanize

Here it is - no javascript:

<form action="./xxx.cgi?login" method="post">
 <h1>Login</h1>
 <input  type="text"     name="login_name">
 <input  type="password" name="password">
 <input  type="submit" name="login">
 <button type="submit" name="login">Login</button>
</form>

Replies are listed 'Best First'.
Re^3: Click button with WWW::Mechanize
by thomas895 (Deacon) on Mar 12, 2016 at 06:09 UTC

    I haven't looked at Mechanize's source, but I'm guessing that it doesn't look at <button> elements when parsing the page for forms.

    -Thomas
    "Excuse me for butting in, but I'm interrupt-driven..."

      I haven't looked at Mechanize's source, but I'm guessing that it doesn't look at <button> elements when parsing the page for forms.

      HTML::Form/WWW::Mechanize don't have a problem with buttons inside forms

      use WWW::Mechanize 1.75; my $ua = WWW::Mechanize->new; $ua->get(q{file:123654789987.html}); $ua->dump_forms; __END__ POST file:/xxx.cgi?login login_name= (text) password= (password) login=<UNDEF> (submit) login=<UNDEF> (submit)