Micro Focus QTP (UFT) Forums
Launch QTP using vbscript. - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Launch QTP using vbscript. (/Thread-Launch-QTP-using-vbscript)



Launch QTP using vbscript. - TurtleRock - 01-19-2010

Hi,

Is it possible to write a vbscript, which will open and execute a particular QTP script.

Regards:
TurtleRock


RE: Launch QTP using vbscript. - Saket - 01-19-2010

Yes, Search this forum you will get lots of info on this here


RE: Launch QTP using vbscript. - TurtleRock - 01-19-2010

I found the following script....and it works fine.

Code:
Dim QTPObj,QTPTest
Set QTPObj=CreateObject("QuickTest.Application")

'Check if the application is not already Launched
If Not QTPObj.Launched then
QTPObj.Launch
end if

QTPObj.Visible=True
QTPObj.Open "D:\resolve_automation\Resolve_Regr_CPE_TC 002" 'name of the start up script
Set QTPTest=QTPObj.Test
QTPTest.Run 'Run the Test
QTPTest.Close 'Close the Test
QTPObj.Quit 'Quit the QTP Application


Regards:
TurtleRock