How to close QTP while running the scripts from QC
I am running My driver script from QC, finally i want to close the QTP, how can we do that? I tried by creating QTP object and used the quit method but its not working...
QTP 9.5 and QC 9.2
Re: How to close QTP while running the scripts fro
Below Function call in your end of driver Script...
Private Function CloseQTP
Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2")
Set colProcess = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = 'QTPro.exe'")
For Each objProcess in colProcess
Set objWMIService = Nothing
Set colProcess = Nothing
Ravi Konka -
***** Help others it will help you *****