ActiveX component can't create object: 'QuickTest.Application

Hi,
I am getting following error in line "Set objQTP = CreateObject("QuickTest.Application")".

Error: ActiveX component can't create object: 'QuickTest.Application'
Code: 800A01AD
Source: Microsoft VBScript runtime error

This is very inconsisitent, I am not getting this always. I observed that when QTP takes more than 2 mins to launch that time this error occured. Other wise I am able to launch the QTApplication from VB Script.
Is there any where I can set up timeout for ActiveX component?
I need the solution ASAP. Please help me.

 

 

P.S. This thread has been moevd from uality Center Support and News Forum to Unified Functional Testing (formerly QTP) News and Support Forum. - Hp Forum Moderator

Parents
  • As a workaround you can launch QTP first

    dim commandLine, WshShell

    ' Define command line
    commandLine = """C:\Program Files\HP\QuickTest Professional\bin\QTPro.exe"""
    Set WshShell = CreateObject("WScript.Shell")

    ' Start QTP via command line
    WshShell.Run commandLine, 8, true

    ' Wait a while until QTP is loaded (here 10 secs)
    WScript.Sleep 10000

    set WshShell=nothing

    Then use the usual CreateObject("QuickTest.Application") to start a test. It will re-use the already launched QTP instance.

Reply
  • As a workaround you can launch QTP first

    dim commandLine, WshShell

    ' Define command line
    commandLine = """C:\Program Files\HP\QuickTest Professional\bin\QTPro.exe"""
    Set WshShell = CreateObject("WScript.Shell")

    ' Start QTP via command line
    WshShell.Run commandLine, 8, true

    ' Wait a while until QTP is loaded (here 10 secs)
    WScript.Sleep 10000

    set WshShell=nothing

    Then use the usual CreateObject("QuickTest.Application") to start a test. It will re-use the already launched QTP instance.

Children
  • I was able to launch qtp using object for quicktest.application

    but suddenly when I restarted the machine once, It stopped working. i am getting an unspecified error.

    I have tried all solutions on this page and,

    tried refreshing/deleting user profile

    Tried reinstalling uft

    but no luck.

     

    I tried Thomas' solution, however, after launching UFT, script just stops responding and does not proceed further

    Can someone help please? this is a critical issue