I have to run commands in PuTTY its a toll to connect UNIX environment, work like dos command prompt... accepts commands and gives output to the user too. Please let me know if anyone knows how to do it.
I worked with Putty command screen (even 2 command screen in wich I used Linux commands).
1. in Putty configuration screen you must define sessions and here you can select (in Silk testcase)the desired session;
2. in Putty command screen you can use Typekeys method for your commands (strings finished with Enter).
Do i have any function by which i can read the output generated by the PuTTY?
According to my requirement i have to run commnads as well as validate the output generated by the server, and i can proceed with my testcases only if the proper output is generated. Please let me know if i can do this.
Is it possible to perform all required operations via command line or by means output redirection to putty?
In this case you may just call SYS_Execute function and one of its parameter is LIST OF STRING containing output. But all operations have to be performed in one session. This is disadvantage
<font class="small">Code:</font><hr /><pre>
[ ] // Windows declaration for Putty window
[-] window DialogBox Putty
[ ] tag "* - PuTTY"
[ ] // Capture the screen contents and return as a list of strings
[-] LIST OF STRING getScreenContents()
[ ] LIST OF STRING ClipboardContents
[ ] // open the system menu and select copy all to clipboard menu command
[ ] this.TypeKeys("<ALT-SPACE>o")
[ ] // get the clipboard contents
[ ] ClipboardContents = Clipboard.getText()
[ ] return ClipboardContents