From: jaimini b. <jai...@gm...> - 2008-12-01 02:49:43
|
Just to add, I am running this script under cygwin. Does this need any special handling. Thanks Jaimin On Sun, Nov 30, 2008 at 8:01 PM, jaimini bhavsar <jai...@gm...>wrote: > Hi Everybody, > > I am trying to automate login/password, to a storage box, Manually I am > able to perform the operation successfully. Using my script I am able to > check that username is asked, and when I send username I do not get the > prompt for password, I tried sending username by succeeding it with "\r", > "\n", "\r\n" but nothing works. > > Highly appriciate if some body can give me some clue on where am I going > wrong. Please find below, debug output from the script. > > Thanks in advace. > Jaimin. > > ========================================== > INFO: Executing delete command > Sending 'delete\n' to spawn id(3) > at /usr/lib/perl5/site_perl/5.10/Expect.pm line 1264 > Expect::print('Expect=GLOB(0x102ce260)', 'delete\x{a}') called at > ./testpsm.pl line 912 > main::psm_delete('manage', '!manage', 'jaimin') called at > ./testpsm.pl line 885 > main::manage(16.83.140.45, 'manage', '!manage', 'delete', > 'jaimin') called at ./testpsm.pl line 985 > Starting EXPECT pattern matching... > at /usr/lib/perl5/site_perl/5.10/Expect.pm line 561 > Expect::expect('Expect=GLOB(0x102ce260)', 1, 'No user login details > available\x{d}\x{a}Enter username and password ...') called at ./testpsm.pl > line 921 > main::psm_delete('manage', '!manage', 'jaimin') called at > ./testpsm.pl line 885 > main::manage(16.83.140.45, 'manage', '!manage', 'delete', > 'jaimin') called at ./testpsm.pl line 985 > spawn id(3): list of patterns: > #1: -ex `No user login details available\r\nEnter username and password > of MSA device to proceed\r\n* Username: ' > > > spawn id(3): Does `' > match: > pattern #1: -ex `No user login details available\r\nEnter username and > password of MSA device to proceed\r\n* Username: '? No. > > No user login details available > Enter username and password of MSA device to proceed > * Username: > spawn id(3): Does `No user login details available\r\nEnter username and > password of MSA device to proceed\r\n* Username: ' > match: > pattern #1: -ex `No user login details available\r\nEnter username and > password of MSA device to proceed\r\n* Username: '? YES!! > Before match string: `' > Match string: `No user login details available\r\nEnter username and > password of MSA device to proceed\r\n* Username: ' > After match string: `' > Matchlist: () > Sending 'manage\r\n' to spawn id(3) > at /usr/lib/perl5/site_perl/5.10/Expect.pm line 1264 > Expect::print('Expect=GLOB(0x102ce260)', 'manage\x{d}\x{a}') called > at ./testpsm.pl line 942 > main::psm_delete('manage', '!manage', 'jaimin') called at > ./testpsm.pl line 885 > main::manage(16.83.140.45, 'manage', '!manage', 'delete', > 'jaimin') called at ./testpsm.pl line 985 > Starting EXPECT pattern matching... > at /usr/lib/perl5/site_perl/5.10/Expect.pm line 561 > Expect::expect('Expect=GLOB(0x102ce260)', 1, '* Password: ') called > at ./testpsm.pl line 952 > main::psm_delete('manage', '!manage', 'jaimin') called at > ./testpsm.pl line 885 > main::manage(16.83.140.45, 'manage', '!manage', 'delete', > 'jaimin') called at ./testpsm.pl line 985 > spawn id(3): list of patterns: > #1: -ex `* Password: ' > > > spawn id(3): Does `' > match: > pattern #1: -ex `* Password: '? No. > > ERROR: psm_delete: Did not prompt for password > debug : should have propmt for password. > Starting EXPECT pattern matching... > at /usr/lib/perl5/site_perl/5.10/Expect.pm line 561 > Expect::expect('Expect=GLOB(0x102ce260)', 0) called at ./testpsm.pl > line 254 > main::syncup() called at ./testpsm.pl line 51 > main::cleanup() called at ./testpsm.pl line 1040 > spawn id(3): list of patterns: > ============================================ > > |