Allow other HP products to interact option in QTP and Launch QC explorer

 Here is the code to set "Allow other HP products" option to true before starting automation.

Set objWshShell = CreateObject("WScript.Shell")
Set objApp = createObject("QuickTest.Application")
objWshShell.RegRead("HKEY_CURRENT_USER\Software\Mercury Interactive\QuickTest Professional\MicTest\")
        If Err <> 0 Then
            Wscript.Sleep 1000
            objApp.Visible = False
            objApp.Options.Run.RunMode = "Fast"
        End If
        objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Mercury Interactive\QuickTest Professional\MicTest\AllowTDConnect","1","REG_DWORD"

' Launches QC Explorer
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists ("C:\Program Files\Common Files\HP\QCExplorer\QCExplorer.exe") Then
   "cmd /K CD C:\Program Files\Common Files\HP\QCExplorer\ & QCExplorer.exe http://" 
ElseIf objFSO.FileExists ("C:\Program Files (x86)\Common Files\HP\QCExplorer\QCExplorer.exe") Then
   "cmd /K CD C:\Program Files (x86)\Common Files\HP\QCExplorer\ & QCExplorer.exe"
      Msgbox "QC Explorer not launched as .exe file not found"
End If

Happy Testing!


Popular posts from this blog

XPATH for IE / internet explorer

RPA - Blue Prism, OpenSpan, Automation Anywhere vs UIPath