QTP access to Linux/UNIX
Question ID: 104144
1
0

I need to access an LINUX machine to do some file maintenance for example see if a file exist or delete it. Can QTP work with Linux and UNIX system and if so how?

Marked as spam
Posted by (Questions: 15, Answers: 10)
Asked on July 7, 2010 4:23 pm
237 views
Answers (2)
2
Private answer

Yes you can access a Linux and Unix machine via ssh or telnet using a tool called PuTTY and QTP Standard windows add in. More information about PuTTY can be found at http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. Recording function of QTP will not work unless you ensure Automation > 'Record and Run Setting' > 'Application opened via the Desktop (by the windows shell)' is checked.

Here is an example using PuTTY and descriptive programming.


#######################################################  
'@Description This is a standard PuTTY wait routine  
Public Function PuttyWait(ByRef myText)  

Do  
  wait(1)  
  results= Window(''regexpwndtitle:=PuTTY'', ''regexpwndclass:=PuTTY'').GetVisibleText  
  myPos = Instr(results, myText)  
  loop until myPos >0  
End Function  


'========================  
Pwd=''PASSWORD''  
userid=''QATester''  
remoteIP = ''192.168.74.144''  
'========================  

'  Launch PuTTY  
SystemUtil.Run ''C:binputty.exe'','''',''C:bin'',''open''  

With Window(''regexpwndtitle:=PuTTY Configuration'')  
  'Enter IP address and press open button  
  .WinEdit(''nativeclass:= Edit'', ''attached text:=Host &Name (or IP address)'').Set remoteIP  
  .WinButton(''text:= &Open'').Click  
End With  

With Window(''regexpwndtitle:=PuTTY'', ''regexpwndclass:=PuTTY'')  

  .Activate  

  PuttyWait (''login'')  

  .Type userid  
  .Type micReturn  

 PuttyWait(''password'')  

 .Type Pwd  
 .Type micReturn  

 'wait for system to respond  
 Wait(5)  

 'get all text in the open window and display it.   
 ' more options   
 myTxt= .GetVisibleText   
 MsgBox myTxt  


End With   
'#######################################################  
Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on July 7, 2010 5:15 pm
0
Starting with QTP 11 and UFT 11.5 it supported Putty directly from the Terminal Emulatoer add in... Check out http://eyeontesting.com/questions/5397/how-to-connect-to-a-remote-linux-server.html
( at January 30, 2014 4:39 am)
0
Private answer

Starting with QTP 11 and UFT 11.5 it supported Putty directly from the Terminal Emulatoer add in... [Check out http://eyeontesting.com/questions/5397/how-to-connect-to-a-remote-linux-server.html ][1]

[1]: http://eyeontesting.com/questions/5397/how-to-connect-to-a-remote-linux-server.html+

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on January 30, 2014 4:39 am
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top