Error when trying to use QTP API in script file
Question ID: 105221
0
0

I have a vbs file that launches QTP 11. This is the code I have in the file:
set qtp=CreateObject("QuickTest.Application")
qtp.launch
qtp.visible=true

When I try executing this on a Win 7 machines. I’m getting the following error when executing the VbScript:

Active X component can’t create object

Marked as spam
Posted by (Questions: 227, Answers: 22)
Asked on January 28, 2014 3:14 pm
92 views
Answers (1)
1
Private answer

There are a few different things that could cause this problem. Here are a few things to check below, in order of most likely causes. This CreateObject command for QuickTest.Application only works on machines that have QTP installed on them. I have had users try to run this on a machine that didn't have QTP.

A. The QTP application doesn't have the mapping for the QTP object in the registry. To fix this, please try the following:

Go to the command prompt (launch it by right-clicking on it and selecting ''Run as Administrator'' first. Failure to do this will most likely throw an error trying to run the commands listed below.

Run this command. You may need to double-check the location path of the .exe file on your Windows in case it is installed in a different location (such as 32 bit vs. 64 bit)

''C:Program Files (x86)HPQuickTest ProfessionalbinQTAutomationAgent.exe'' /regserver

B. Check the registry settings:

1. Check that the following key exists in the registry HKEY_CLASSES_ROOTQuickTest.ApplicationCLSID

2. Take the classid from the registry and check that the key for it exists under HKEY_CLASSES_ROOTCLSID (or if it's a 64 bit machine HKEY_CLASSES_ROOTWow6432NodeCLSID)

3. Verify that under this key the LocalServer32 points to ''QtpAutomationAgent.exe'' under QTP's bin director

C. Run a repair on the QTP installation in the Programs/Features section of the Windows control panel.

c. You may want your IT department to check for network delays if you are using a concurrent license with the license server. Users have encountered problems when the network is too slow and QTP requests a refresh on the license.

Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on January 28, 2014 3:15 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top