WaitFor fails while Prompt works (General questions)
Hi,
I am evaluating wodSSH for use in test automation. I am using Perl to request wodSSH COM object. My test code works if I specify Prompt before connection. But it would fail (got stuck) if I use WaitFor after connection instead. Can someone help me out? Thanks. (The target is Ubuntu Linux running sshd.)
==== code that WORKS ====
my $ssh = Win32::OLE->new( WeOnlyDo.wodSSHCom.1 );
$ssh->{Protocol} = 4;
$ssh->{HostName} = 'auto-dev03';
$ssh->{Blocking} = 'True';
$ssh->{Login} = 'autodev';
$ssh->{Prompt} = 'autodev@auto-dev03:~$ ';
$ssh->{Password} = 'password';
$ssh->Connect();
$ssh->Execute( ls
);
print $ssh->Receive();
print $ssh->Receive();
==========================
# if remove $ssh->{Prompt}... and use WaitFor instead, then it got
# stuck
$ssh->Connect();
$ssh->WaitFor('autodev@auto-dev03:~$ ');
$ssh->Execute( ls
, 'autodev@auto-dev03:~$ ');
print $ssh->Receive();
print $ssh->Receive();
Complete thread:
- WaitFor fails while Prompt works - novanstar, 2008-11-01, 00:06
- Re: WaitFor fails while Prompt works - wodDamir, 2008-11-01, 14:42
- Re: WaitFor fails while Prompt works - novanstar, 2008-11-01, 19:35
- Re: WaitFor fails while Prompt works - novanstar, 2008-11-01, 19:38
- Re: WaitFor fails while Prompt works - wodDamir, 2008-11-01, 20:42
- Re: WaitFor fails while Prompt works - novanstar, 2008-11-03, 23:21
- Re: WaitFor fails while Prompt works - wodDamir, 2008-11-03, 23:24
- Re: WaitFor fails while Prompt works - novanstar, 2008-11-04, 00:35
- Re: WaitFor fails while Prompt works - wodDamir, 2008-11-03, 23:24
- Re: WaitFor fails while Prompt works - novanstar, 2008-11-03, 23:21
- Re: WaitFor fails while Prompt works - wodDamir, 2008-11-01, 20:42
- Re: WaitFor fails while Prompt works - novanstar, 2008-11-01, 19:38
- Re: WaitFor fails while Prompt works - novanstar, 2008-11-01, 19:35
- Re: WaitFor fails while Prompt works - wodDamir, 2008-11-01, 14:42