01-04-2010, 01:44 PM
hello,
Can we open putty via QTP without Terninal Emulator Add-in?
Can we open putty via QTP without Terninal Emulator Add-in?
|
open Putty via QTP
|
|
01-04-2010, 01:44 PM
hello,
Can we open putty via QTP without Terninal Emulator Add-in?
01-05-2010, 02:39 AM
Yes you can. It is just like any other application. Here are two functions I wrote for Putty. You can type in the putty client just like a cmd dialog.
Code: 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 FunctionIf you have any further questions please ask.
01-05-2010, 09:14 AM
Thanks for the Reply.
Can you please tell me if it is possible to Telnet an Ip from RUN via QTP without help of TE Add-in? Regards, Rachna
01-05-2010, 08:54 PM
Yes, I do it all the time either with both Putty and the cmd prompt.
|
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| QTP does not record the first step of open filight reservation application. | Blossoms | 9 | 19,402 |
07-20-2015, 05:50 PM Last Post: AJAJ |
|
| QTP(UFT) and putty | hachem | 0 | 4,088 |
03-03-2015, 05:16 PM Last Post: hachem |
|
| When QTP is open am not able to open my AUT. | chetan3987 | 2 | 3,685 |
02-12-2014, 01:18 AM Last Post: supputuri |
|
| How to enter values into excel which is already open using QTP | Narayanan | 1 | 4,877 |
12-11-2013, 07:30 AM Last Post: basanth27 |
|
| cannot open QTP tests | learnasugo | 8 | 10,479 |
10-18-2012, 11:28 AM Last Post: Ankesh |
|