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
  • Hi Thomas,

    I have tried with the workarround that you suggested. But it did not work for me. This never executes the next line of code after opening qtp(to see this I had given break point at qtp object creation line). Then I have to stop running the script.

    Here is what my code section:

    dim commandLine, WshShell

    ' Define command line
    commandLine = """C:\Program Files\Mercury Interactive\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 ( 3 mins)
    WScript.Sleep 180000

    ' set WshShell=nothing

    Set objQTP = CreateObject("QuickTest.Application")

    Sasmita
Reply
  • Hi Thomas,

    I have tried with the workarround that you suggested. But it did not work for me. This never executes the next line of code after opening qtp(to see this I had given break point at qtp object creation line). Then I have to stop running the script.

    Here is what my code section:

    dim commandLine, WshShell

    ' Define command line
    commandLine = """C:\Program Files\Mercury Interactive\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 ( 3 mins)
    WScript.Sleep 180000

    ' set WshShell=nothing

    Set objQTP = CreateObject("QuickTest.Application")

    Sasmita
Children
No Data