Today i had similar issue with UFT 11.52. The object spy stopped recognizing my window. I had to close the browser and restart UFT to be able to work again.
Unfortunately, i cant seem to reproduce this issue
'============ Kill QTP Processes ===================
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = 'QTPro.exe'")
For Each objProcess in colProcessList
Set colProcessList = Nothing
Set objWMIService = Nothing
What happens after the .vbs file is run? I'm not sure what it is doing.
Should it kill the QTP session that is showing on the screen.
i have not tried it yet, but I wanted to know the expected outcome so I can tell if it is working correctly.
It will kill all QTPro.exe processes. Look in the task mananger, determine if there are any QTPro.exe processes. Run the script, view task manager. No QTPro.exe processes should show in the task manager.