ajose has asked for the wisdom of the Perl Monks concerning the following question:
The output of mech-dump utility is:<form action="/goform/formHandlerConfigureDMPName" method="post" onsub +mit = "return validateDMPNameOnSubmit(this)"> <td width="5%"><img src="../invis.gif" alt="" width="50" heigh +t="30"/></td> <td width="45%">DMP Name:</td> <td width="50%"><input type="text" name="DMPName" value="Curre +nt Name" maxlength="129"/> <input type="submit" value="App +ly"/></td> </form>
But while trying to set the current form to the desired one using the method form_with_fields(), it returns an error "No elements found for form with fields [DMPName]".POST http://xxx.xxx.xxx.xxx/goform/formHandlerConfigureDMPName DMPName=Current Name (text) <NONAME>=Apply (submit)
With the above code snippet it is possible to select and set the current form to different forms in the same web page.my $input_name = 'DMPName'; my $web_url = 'http://xxx.xxx.xxx.xxx/DMP_config.asp'; my $mech = WWW::Mechanize::Firefox->new(); $mech->get($web_url, no_cache => 1); $current_form = $mech->form_with_fields($input_name); print "Present value of $input_name: " . $mech->value($input_name);
Any help to figure out this issue is appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Not able to select the form with WWW::Mechanize::Firefox using form_with_fields()
by Anonymous Monk on Jun 28, 2011 at 09:44 UTC | |
by ajose (Acolyte) on Jun 28, 2011 at 10:58 UTC | |
by Anonymous Monk on Jun 28, 2011 at 11:03 UTC | |
by ajose (Acolyte) on Jun 28, 2011 at 12:45 UTC | |
by Anonymous Monk on Jun 28, 2011 at 12:53 UTC | |
|