smarthacker67 has asked for the wisdom of the Perl Monks concerning the following question:
my perl codewhen I dump the form bless( { # 'id' => 'chooseupload', # 'value' => undef, # 'name' => 'filename', # 'tabindex' => '-1', # 'value_name' => '', # 'type' => 'file', # 'size' => '40', # 'class' => 'filestyle', # 'style' => 'position: absolu +te; clip: rect(0px 0px 0px 0px);', # 'accept' => 'application/pdf +', # 'data-buttonname' => 'btn-de +fault' # }, 'HTML::Form::FileInput' ),
my $mech = WWW::Mechanize->new(); $mech->cookie_jar(HTTP::Cookies->new()); $mech->get($url); $mech->field("id", $username); $mech->field("password", $password); $mech->click(); $mech->set_fields( identifier => [ 'xyzzzzz' ] , ConfirmationEmail => [ 'email@id.com' ] , tmpto => [ '13222222222222' ] , # pdfcreate=> [filename=> "UserAgent_Beschreibung. +pdf", # 'Content-Type' => 'application/pdf'], ); print $mech->content(); $mech->submit_form();
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Upload file and Form filling using the mechanise
by Corion (Patriarch) on Jun 16, 2017 at 21:43 UTC | |
Re: Upload file and Form filling using the mechanise
by 1nickt (Canon) on Jun 16, 2017 at 16:06 UTC | |
Re: Upload file and Form filling using the mechanise
by smarthacker67 (Beadle) on Jun 16, 2017 at 21:39 UTC | |
by choroba (Cardinal) on Jun 16, 2017 at 21:52 UTC |