Get Active X error trying to use CreateObject method
Question ID: 105533
0
0

Sometimes I am getting an error about Active X when I try to use an application’s API. It usually gets thrown when I try to use the CreateObject method. For instance, if I try to connect to ALM from QTP using the TDConnection object, it gives me an error. I can’t figure out what is happening.

Marked as spam
Posted by (Questions: 89, Answers: 4)
Asked on July 28, 2014 3:01 pm
26 views
Answers (2)
2
Private answer

Usually when you get the kind of error you are describing, the classes of the application's api aren't registered, so QTP can't instantiate the object properly. You probably have something missing/not installed that needs to be (runtime libraries, etc.)

For example, if you want to use the TDConnection object like you mentioned, you would first need to go to QC/ALM's addins page and download the Connectivity installer and execute it. This file contains the QC/ALM libraries the QTP will use to connect. Once you have run that and installed it, I bet your CreateObject statment will now work if the syntax is correct.

Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on July 28, 2014 3:01 pm
0
Private answer

Here's a tip from something I ran into that was driving me crazy. If you get an Active X error when trying to launch QTP/UFT via the Automation Object Model, double-check the UFT shortcut you have (probably on your desktop). Right-click on it and check the properties, and go to the compatibility tab. Make sure that the 'Run as administrator' is not checked. This will cause an elevation mis-match and throw an error when trying to launch UFT.

Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on January 10, 2017 2:44 am
EyeOnTesting

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

X
Scroll to Top