06-18-2012, 11:12 PM
(This post was last modified: 06-21-2012, 12:17 AM by gunaseakaran.)
i need to validate the return code after executing the simple command in unix machine loggedin thru putty
logged in to the system thru putty using telnet and recorded, i need to automate and validate
the return code after executing simple command. pls send some examples to try it out.
tried gettextvalue,checkpoints no results
validation is like. if i get "0" my command is successful else the executed commad is failed
thru QTP GUI i am able to execute(write) the command to the putty window in a unix machine
ex : window(PuTTY).Type <unix commands to be executed> can i read it thru same window ? any suggestion
pls give the steps
Thanks in advance
Guna
logged in to the system thru putty using telnet and recorded, i need to automate and validate
the return code after executing simple command. pls send some examples to try it out.
tried gettextvalue,checkpoints no results
Code:
systemutil.run "C:\putty.exe"
Window("PuTTY Configuration").WinRadioButton("Telnet").Set
Window("PuTTY Configuration").WinEdit("Host Name (or IP address)").Set "hostname"
Window("PuTTY Configuration").WinButton("Open").Click
wait 2
Window("PuTTY").Type "root"
Window("PuTTY").Type micReturn
wait 1
Window("PuTTY").Type "test*help"
Window("PuTTY").Type micReturn
wait 1
Window("PuTTY").Type "uname -a"
Window("PuTTY").Type micReturn
wait 1
Window("PuTTY").Type."echo $?
Window("PuTTY").Type micReturn
0
validation is like. if i get "0" my command is successful else the executed commad is failed
thru QTP GUI i am able to execute(write) the command to the putty window in a unix machine
ex : window(PuTTY).Type <unix commands to be executed> can i read it thru same window ? any suggestion
pls give the steps
Thanks in advance
Guna