How to close Object Spy of HP UFT(12.02) using vbscript -
we using uft automation testing , have our own framework invoke uft , load scripts. if chance object spy open uft gives error " program waiting user.." can 1 close object spy ( if open) using vb scripts commands
object spy part of uft.exe process - maybe use wmi query check if exists before invoke , kill if so?
option explicit dim objwmiservice, objprocess, colprocess dim strcomputer, strprocesskill strcomputer = "." strprocesskill = "'uft.exe'" set objwmiservice = getobject("winmgmts:{impersonationlevel=impersonate}!\\" & strcomputer & "\root\cimv2") set colprocess = objwmiservice.execquery("select * win32_process name = " & strprocesskill ) each objprocess in colprocess objprocess.terminate() next wscript.echo "just killed process " & strprocesskill & " on " & strcomputer
or saying open uft programmatically , object spy opening on own somehow?
Comments
Post a Comment