Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fetch the QC path from QTP?
#1
Not Solved
Hi!!!
We have a piece of code that runs into the QC folder structure and fetch the input excel file from the location where we stored for all the tests and create a folder in my local path and then while QTP runs, it fetches the datas from the local path. I do not want to happen it in the existing way. Actually we are using the query to fetch the testname. Like the same way, i need to fetch the path name and store it for a later use.
could u pls help me out in this.
Following is the code which fetches the file and store it my local box.
IF possible please alter this code in such a way to import directly to my script.

Code:

Code:
TestName = "TerminalCreation"
Filename = GetAttachment(TestName)
Public Function GetAttachment(TestName)
Dim strTestName
strTestName=TestName
Set tdc=QCUtil.TDConnection
Set TstFact=tdc.TestFactory
Set TestList= TstFact.NewList("select TS_TEST_ID,TS_PATH from TEST where TS_NAME='"&strTestName&"'")
Set strTestName=TestList.Item(1)
Set AttFact=strTestName.Attachments
Set AttachList=AttFact.NewList("")
for each AttList in AttachList
    Longfilename=AttList.Name
    Set TestAttachStorage=AttList.AttachmentStorage
    TestAttachStorage.ClientPath="C:\Automation"
    AttList.Load True,"C:\Automation"
Next
GetAttachment=Longfilename
End Function


Thanks in Advance.....
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Any digit in xpath path using Regular expression Priyam 1 3,256 10-05-2016, 11:05 AM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)