Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QC OTA Run Only one script and How to import DataTable during run time
#2
Not Solved
Please try the below code
Code:
Public Function Func_DownloadAttachement_FromQC(pvt_QC_Folders_NodeName, pvt_LocalFolderPathWhereFileshaveTobeDownloaded)
Set tdc=TDUtil.TDConnection
Set gTreeManager = tdc.TreeManager
Set root=gTreeManager.TreeRoot("Subject")
set gSysTreeNode = gTreeManager.NodeByPath(pvt_QC_Folders_NodeName)
Set fact=gSysTreeNode.Attachments
Set alist = fact.NewList("")

'Find the right attachment and download it to the temp folder
For Each att In alist
Set ext = att.AttachmentStorage
attname = att.DirectLink   'other functionality att.id,  att.filename
Out_file_Name = Replace(attname, gSysTreeNode.NodeID,"")

    ext.Load attname, True
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set MyFile = fso.GetFile(ext.ClientPath & "\" & attname)
    MyFile.Copy ( pvt_LocalFolderPathWhereFileshaveTobeDownloaded & "\" & Out_file_Name)
    Set fso = Nothing
    Set MyFile = Nothing
    
Next
End Function
Reply


Messages In This Thread
RE: QC OTA Run Only one script and How to import DataTable during run time - by ravi.gajul - 01-02-2012, 04:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Run Result Viewer-Standalone tool aeronmak 1 2,592 04-08-2014, 10:59 AM
Last Post: Ankur
  qtp run error nawres 5 4,566 12-07-2012, 07:52 PM
Last Post: elango87
  how to run multiple QTP scripts from QC on different remote machines urksp 1 6,289 09-07-2011, 03:20 PM
Last Post: rameshrise3
  when to use the command InvokeApplication and SystemUtil.Run srivaas.b 2 5,407 12-24-2010, 10:51 AM
Last Post: Shubhangi
Toungue Batch Run bfakruddin 1 3,109 11-02-2010, 09:33 PM
Last Post: sreekanth chilam

Forum Jump:


Users browsing this thread: 3 Guest(s)