in reply to Re^2: Mechanize Problems
in thread Mechanize Problems
Some experimentation with HTTP::Recorder suggests that what you want in place of $mech->click_button(value => "Fold it"); is instead: $mech->click('Action'); :
$agent->get('http://rna.tbi.univie.ac.at/cgi-bin/RNAfold.cgi'); $agent->form_number(1); $agent->tick('toggles', '-noLP'); $agent->field('name', 'fakename'); $agent->tick('SVG', 'on'); $agent->field('email', name@domain.com'); $agent->field('Temp', '37'); $agent->tick('plot', 'on'); $agent->field('Params', 'RNA'); $agent->field('Sequence', 'GATTACAGATTACAGATTACA'); $agent->field('pffold', 'pf'); $agent->click('Action');
(HTTP::Recorder records scripts using "$agent" instead of "$mech".)
Viewing the HTML source of the page in question would have revealed your error:
<input type="hidden" name="rec-form1-submit-Action" value=1> <input type="submit" name="Action" value="Fold it"> ^^^^^^
HTH,
|
|---|