in reply to WWW::Mechanize - Unable to fill password field
Your code works fine for me in conjunction with the following html and cgi script:
index.html:mycgi.pl:<!DOCTYPE html> <html> <head><title>Python CGI</title></head> <body> <form action="cgi-bin/mycgi.pl" method="post"> <div> <label for="name">User Name:</label> <input id="name" name="ctl00$cntPlaceHolder$UsernameTextBox" typ +e="text"> </div> <div> <label for="password">Last Name:</label> <input id="password" name="ctl00$cntPlaceHolder$PasswordTextBox" + type="password"> </div> <div> <input type="submit" value="submit"> </div> </form> </body> </html>
#!/usr/bin/env perl use CGI; use CGI::Carp qw{ fatalsToBrowser }; my $cgi = CGI->new; print $cgi->header, $cgi->start_html('Test Page'), $cgi->h4('Params:'), $cgi->div('Name: ' . $cgi->param('ctl00$cntPlaceHolder$UsernameT +extBox')), $cgi->div('Password: ' . $cgi->param('ctl00$cntPlaceHolder$Passw +ordTextBox')), $cgi->end_html;
HTML Code after clicking view source
But what does your program output from the following line:
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: WWW::Mechanize - Unable to fill password field
by doubledecker (Scribe) on Jan 05, 2015 at 07:39 UTC | |
by Anonymous Monk on Jan 05, 2015 at 08:17 UTC |