$mech->submit_form( form_number => 1, fields => { username => 'mungo', password => 'lost-and-alone', } ); # as from $mech->submit_form( ... ) # If button is not passed, then the submit() method is used instead.