Connect to Putty Using QTP and Run events on Putty through QTP

1,912 views
Skip to first unread message

RamaKrishna Gondrala

unread,
Jul 2, 2013, 7:33:05 AM7/2/13
to mercu...@googlegroups.com
Hi All,

I need to Connect to Putty through QTP and Run events on Putty from QTP. Can anyone suggest me how to do it?

Thanks,
Rama Krishna

Venkat Kandula

unread,
Jul 2, 2013, 8:58:54 AM7/2/13
to mercu...@googlegroups.com
Hi Rama Krishna,

I am working knowledge on QTP ans Putty. Let me what is your exact requirement


Thanks,
Venkat

Ravi Sid

unread,
Jul 2, 2013, 8:36:26 AM7/2/13
to mercu...@googlegroups.com
U can use TE addin


--
--
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 Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
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 mercuryqtp+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

RamaKrishna Gondrala

unread,
Jul 2, 2013, 9:14:08 AM7/2/13
to mercu...@googlegroups.com
I want to connect to Putty through QTP script and after that want to run event by using some command. and after that need to edit some file in vi editor?
Is this possible?

jitu sonawane

unread,
Jul 3, 2013, 1:46:53 AM7/3/13
to mercu...@googlegroups.com
yes possible .. 

RamaKrishna Gondrala

unread,
Jul 3, 2013, 1:53:18 AM7/3/13
to mercu...@googlegroups.com
Can you suggest me how to do it?



yes possible .. 
--
--
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 Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
 
---
You received this message because you are subscribed to a topic in the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mercuryqtp/TpUgde6FNc4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mercuryqtp+...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--








....Rama Krishna....

jitu sonawane

unread,
Jul 3, 2013, 2:10:14 AM7/3/13
to mercu...@googlegroups.com
below is the ref code which i got from other qtp forums.. I am able to use it successfully

Function closePutty()

    'This Closes the Putty Window.
    Dim AppCount

    On Error Resume Next
    InfoLog "Closing Putty"
    If window("PuTTY").Exist(0) Then
        window("PuTTY").Type "Quit"
    End If

    If window("PuttyConfig").Exist(0) Then
        Window("PuttyConfig").Close
    End If

    If window("PuTTY").Exist(0) Then
        Window("PuTTY").Close
        Window("PuTTY").Dialog("PuTTY Exit Confirmation").WinButton("OK").Click
    End If
End Function

Function startPutty(sServerIP,sPort,bWindowTitle,sWindowName)
    'This function will start the Putty Application.
    'sServerIP is the Server IP to connect too.
    'sPort is the port to be connecting too.
    'bWindowTitle is whether you want to change the name of the window.
    'sWindowName is the name of the window that will be changed too.
    Dim SettingsFile

    On Error Resume Next
    closePutty
    InfoLog "Starting Putty"
    SettingsFile="C:\Program Files\PuTTY\putty.exe"
    If fso.FileExists(SettingsFile)=False Then 'Verify that Putty is installed.
        ErrorLog  SettingsFile & " does not exist."
        startPutty=False
        Exit Function
    Else
        startPutty=True
    End If
    SystemUtil.Run "C:\Program Files\PuTTY\putty.exe", "", "", ""
    Window("PuttyConfig").WinRadioButton("Telnet").Set
    Window("PuttyConfig").WinEdit("Host Name").Set sServerIP
    Window("PuttyConfig").WinEdit("Port").Set sPort
    If bWindowTitle=True Then
        Window("PuttyConfig").WinTreeView("Category:").Select "Window;Behaviour"
        Window("PuttyConfig").WinEdit("Window title:").Set sWindowName
    End If
    
    Window("PuttyConfig").WinButton("Open").Click
    Wait(5)
    If bWindowTitle=False Then
        window("PuTTY").Activate
        window("PuTTY").Type micReturn
    End If

    ErrorCatcher Err.Number, Err.Description
    Err.Clear
End Function
Reply all
Reply to author
Forward
0 new messages