Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unix commands
#5
Not Solved
mmhhh... i don't believe to can use the same way. I interact from QTP to SSH client defining objects and passing text strings + enter, in this way:

Code:
dim crt, conn, tree, butt, finestra
set crt  = Window("regexpwndtitle:= SecureCRT", "index:=0")
set conn = crt.Window("regexpwndtitle:=Connect", "index:=1")
set tree = conn.WinTreeView("regexpwndclass:=SysTreeView32")
set butt = conn.WinButton("regexpwndtitle:=&Connect")
      
SystemUtil.Run "C:\Programmi\SecureCRT\SecureCRT.EXE"
tree.Select "Sessions;BEA_BE;machinexyz"
butt.Click
crt.Activate
Set finestra = crt.WinObject("regexpwndclass:=AfxFrameOrView42")
wait(5)
      
finestra.Type "cd /path_log"
finestra.Type micReturn
finestra.Type "esist=`du file.log | cut -b -1`"
finestra.Type micReturn


i.e. QTP uses SSH client as ... ehm... a monkey worker :-)
Now the variable "esist" will be =0 or <>0 according to the existence of file.log, but only on this SSH client, not in the script... i can't use "esist" in if-statements... i would need something similar to getroproperty to capture the value of "esist" inside a QTP variable... as:
Code:
dim exist
exist=finestra.getroproperty(esist)
[I know it's impossible because object spy doesn't see the value of 'esist']

Is it possible in some other way or it can't be return in QTP from other applications? maybe i should do a ftp from machinexyz to my pc with SSH client, then create an object with Scripting.FileSystemObject...

sorry for post length and thanks
Reply


Messages In This Thread
Unix commands - by stevol - 06-30-2008, 09:15 PM
RE: Unix commands - by Ankur - 07-01-2008, 11:33 AM
RE: Unix commands - by stevol - 07-01-2008, 12:53 PM
RE: Unix commands - by Ankur - 07-01-2008, 01:04 PM
RE: Unix commands - by stevol - 07-01-2008, 03:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP commands ullas.ns 1 4,459 10-25-2012, 01:44 PM
Last Post: silpavinod
  QTP List of Functions and Commands rpc86 4 10,785 01-10-2012, 06:31 PM
Last Post: deepaksporty
  QTP execute REST XML Commands neerukonda9 0 3,068 11-03-2011, 10:53 PM
Last Post: neerukonda9
  How to verify data from UNIX file syhusain 1 3,181 05-19-2011, 10:48 AM
Last Post: deepaksporty
Toungue QTP recording the unix application zhuorulin 1 2,975 03-02-2011, 05:06 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)