Hi Monks,
I m trying to access a webpage that has two dropdown list and two input boxes. The HTML code is as below-
<script language="JavaScript" src="/cpLoginIE.js"></script> <HTML><HEAD><META HTTP-EQUIV="Pragma" CONTENT="no-cache"><META HTTP-EQ +UIV="Expires" CONTENT="-1"></HEAD> <BODY onLoad="self.focus();document.loginfrm.site.focus();populateSite +s('Prod','pso1')"> <form method="POST" name="loginfrm" scope="session" onSubmit="return v +alidateForm();" action="/DPSLogOn?webserver=asiwsws2.ms.com&webport=7 +101&appserver="> <CENTER> <TABLE> <TR> <TD><B>Site:</B></TD> <TD><SELECT name="site" class="drpdwn" size=1 width="200" onCh +ange="populateZones(this, 'pso1');"><OPTION value="Production Support +"></OPTION></SELECT> <INPUT type="hidden" name="shortsite" size="3" value="pso"></T +D> </TR> <TR> <TD><B>Zone:</B></TD> <TD><SELECT name="zone" class="drpdwn" size=1 width="100"><OPT +ION value="pso1"></OPTION></SELECT></TD> </TR> <TR> <TD><B>User ID:</B></TD> <TD><INPUT type="text" name="user" size=20 value="dpsasm"></TD +> </TR> <TR> <TD><B>Password:</B></TD> <TD><INPUT type="password" name="password" size=20></TD> </TR> <TR> <TD colspan="2">DPS User IDs will be deactivated after 120 day +s of inactivity. <br>A new user id will need to be requested after an id is dea +ctivated</TD> </TR>
following is the mech code that i m using to browse the website-
$url = "http://asiwsws2.ms.com:7101/DPSLogOn"; $mech->post( $url ); print " Success 1\n" if( $mech->success ); $mech->submit_form ( form_name => 'loginfrm', fields => { site => 'pso', zone => 'pso1', user => 'dpsasm', password => 'XXXXX' }, );
The above code gives the following error when run -
Illegal value 'pso' for field 'zone' at /appl/emas/modules/lib/perl5/site_perl/5.8.5/WWW/Mechanize.pm line 1367
Is there something that i m missing ? Not sure if it could be because of the embedded javascript
Any help would be highy appreciated
Thanks
In reply to Problem in Mechanize by libvenus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |