Here is what my perl code so far looks like, but I'm not getting the page I want.<script language="JavaScript"> function submitScreen(actionStr) { document.verify.action.value = actionStr return true; } </script> <tr><td colspan="2" align="center"> <form name="verify" method="post" action="../download/download.asp"> <input type="hidden" name="action" value="abort"> <input type="submit" name="Continue" value="Yes" onClick=submitScreen( +"continue")> <input type="Submit" name="Abort" value="No" ></td> </tr>
If my code was working correctly, the page presented by the server would have a set of links to files available for downloading. My intent is to monitor this page and start a download followed by an automated install of the software, followed by an invocation of my automated tests. AdThanksVanceuse HTTP::Request::Common qw(POST); use LWP::UserAgent; $ua = LWP::UserAgent->new(); my $req = POST 'http://companyname.com/Customer/support/Patch/releases +/ClientDownload/download/download.asp', [continue => 'Yes']; #$req->content_type('application/x-www-form-urlencoded'); $req->content('match=www&errors=0&action=abort&continue=Yes'); my $res = $ua->request($req); if ($res->is_success) { print $res->content; if ($res->content =~ m/no software is available/) { print "Did not get desired page\n"; } } else { print "Bad luck this time\n";
In reply to Submitting a form by muradkhan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |