Hi Rama Krishna,

Below Functions will work as per your requiremnt and you can down load the 
text or vi editor  file from putty to your loca drive using File transfer 

protocol(FTP) through command prompt

''******'*******************************************************************************************************************

> 'Function Name Putty_conn
>> 'Description    To Connect the Putty  
>>
>> ''*************************************************************************************************************************
>> Public Function Putty_conn()
>> SystemUtil.Run Environment.Value("PuttyConnection") 
>> End Function
>>
>> '***************************************************************************************************************************
>> 'Function Name Putty
>> 'Description    Click open Button
>>
>> '*************************************************************************************************************************
>> Public Function Putty()
>> Call OWindow1("PuTTY Configuration","PuTTY Configuration")
>> window(OWindow).winEdit("attached text:=Host.*","nativeclass:=Edit").Set 
>> "vdl6"
>> Call Win_Button1("&Open")
>> window(OWindow).winbutton(Win_Button).Click
>> End Function
>>
>> '******'*******************************************************************************************************************
>> 'Function Name Putty_UserName_PWD
>> 'Description   Passing the user name and password
>>
>> '*************************************************************************************************************************
>> Public Function Putty_UserName_PWD()
>> wait(5)
>> Call OWindow1("vdl6.tru.com - PuTTY","PuTTY")
>> User=Environment.Value("User")
>> window(OWindow).Type User
>> window(OWindow).Type micReturn
>> wait(3)
>> 'set AES1 = DotNetFactory.CreateInstance 
>> ("QTPES03Encryption.EncryptionMethods", "QTPES03Encryption")
>> 'Password=Environment.Value("PassWord")
>> 'pwd = AES1.DecryptString(Password, "mypass")
>> Password=Environment.Value("pwd")
>> window(OWindow).Type Password 
>> window(OWindow).Type micReturn
>> End Function
>>
>
'***********************************************************************************************************************
'Function Name GEC_V11_Automation_data
'Description   To change the Directory
'*************************************************************************************************************************
Public Function GEC_V11_Automation_data()
   Call 
OWindow1("sweeper@vdl6:/usr/apps/qc/prod/GEC_V11_Automation","sweeper@vdl6:/usr/apps/qc/prod/GEC_V11_Automation")
window(OWindow).Type Environment.Value("GEC_V11_Automation_data")
window(OWindow).Type micReturn
End Function
'**************************************************************************************************************************
 

'***********************************************************************************************************************************************************
'Function Name  File_Ftp
'Description To connect  the CMD
'*******************************************************************************************************************************************************
Function File_Ftp()
Set appCMD=CreateObject("Wscript.shell")
appCMD.Sendkeys "cd \"
appCMD.Sendkeys "~" 
Wait 2
appCMD.Sendkeys "D:"
appCMD.Sendkeys "~" 
Wait 2
appCMD.Sendkeys "cd D:\GEC V11 Automation Scripts\Text Files" 
appCMD.Sendkeys "~" 
Wait 2 
appCMD.Sendkeys "ftp vdl6"
appCMD.Sendkeys "~" 
Wait 2
appCMD.SendKeys Environment.Value("User")
appCMD.Sendkeys "~" 
Wait 2
appCMD.Sendkeys Environment.Value("pwd")
appCMD.Sendkeys "~" 
Wait 2
appCMD.Sendkeys Environment.Value("GEC_V11_Automation_bin")& 
Environment.Value("auto_m")
appCMD.Sendkeys "~" 
Wait 2
End Function

'***********************************************************************************************************************************************************
'Function Name   CMD 
'Description Exit  CMD
'*******************************************************************************************************************************************************
Function CMD_Exit()
   Set appCMD=CreateObject("Wscript.shell")
Wait 2
appCMD.Sendkeys "bye"
appCMD.Sendkeys "~" 
appCMD.Sendkeys "exit"
appCMD.Sendkeys "~" 
End Function

'******************************************************************************************************************************************************

Hope it helpful for you.

Thanks,
Venkat

-- 
-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to