How to get Test Path in QTP

January 20, 2009

Many a times we need to find out from where the test is running i.e.-the parent is the code for finding out the parent path.

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application objectqtpApp.Test.Location
TestLoc = qtApp.Test.Location
MsgBox TestLoc

Another way..
msgbox Environment("TestDir")

However you need to save the test before run.Else will give
1.not save
2.temp directory as output.

You Might Also Like