Re: Testing WodSSH prompt (General questions)
Tamir,
If I understood you correctly, you're actually trying to test if user provided the correct prompt for their server.
In that case, you can use your code. However, I would suggest small changes. I.e: you can remove the Execute call.
This should be sufficient:
[php]ssh1.Connect
Dim ret as String
ret = ssh1.WaitFor(your_prompt, 10) [/php]
What above code does, is return everything received by the component before the specified prompt arrives. If it doesn't arrive, a Timeout exception will be thrown on WaitFor call, which means that the Prompt isn't correct.
Hope this helps.
Regards,
Damba
Complete thread:
- Testing WodSSH prompt - Tamir, 2009-10-26, 19:04
- Re: Testing WodSSH prompt - woddrazen, 2009-10-26, 20:00
- Re: Testing WodSSH prompt - Tamir, 2009-10-26, 21:01
- Re: Testing WodSSH prompt - woddrazen, 2009-10-26, 21:55
- Re: Testing WodSSH prompt - Tamir, 2009-10-27, 18:22
- Re: Testing WodSSH prompt - wodDamir, 2009-10-27, 18:30
- Re: Testing WodSSH prompt - Tamir, 2009-10-27, 18:22
- Re: Testing WodSSH prompt - woddrazen, 2009-10-26, 21:55
- Re: Testing WodSSH prompt - Tamir, 2009-10-26, 21:01
- Re: Testing WodSSH prompt - woddrazen, 2009-10-26, 20:00