QuickTest Professional crashes or hangs while recording against an ActiveX control.

I am reproducing the solution from Mercury Support.This helped us a long way, my team wasted a lot of time on this issue.

Diagnosis: There is a conflict between QuickTest Professional and the ActiveX control. Determine which control is causing the problem and disable the hooking to that control.

Solution: Disable hooking into problem ActiveX controls

There is a way to create the list of all the ActiveX controls which QuickTest Professional has captured and to disable the hooking of the “problematic” objects.

1. Make sure QuickTest Professional is closed and open up the registry editor.

2. Navigate to the following registry key:

HKEY_CURRENT_USERSOFTWAREMercury InteractiveQuickTest ProfessionalMicTestActiveX Add-in

3. Add a DWORD key value with the name DebugMode; set its value to 1.
a. Go to Edit -> New -> DWORD Value.
b. Enter DebugMode for the Value name.
c. Right-click the new value and select Modify from the pop-up menu.
d. Enter 1 in the Value data field.
e. Click .

This setting instructs QuickTest Professional to add the ProgID of any ActiveX control encountered to the registry while recording.

4. Launch QuickTest Professional and record against your application to a point where you can reproduce the crashing or hanging issue.

5. Refresh or restart the registry editor. You will find the ProgIDs for the ActiveX controls that QuickTest Professional has hooked into under the following key:

HKEY_CURRENT_USERSOFTWAREMercury InteractiveQuickTest ProfessionalMicTestActiveX Add-inProgID

6. Disable the hooks into each of the listed ActiveX controls. Right-click a ProgID value and select Modify. Change the Value data to 0.

The value of the field can be one of the following:
00000000 – Disable record
00000001 – Record
FFFFFFFF – Default mode (indifferent)

Setting the value to 0 will instruct QuickTest Professional not to hook into the control.

Note:
This will modify the way QuickTest Professional identifies the controls.

For example, after disabling the hooking on the control
“Msacal.70.ocx.Calendar”
While spying on the object the Class Name property will be
WinObject:CalendarWndClass
instead of:
ActiveX: MSCAL.Calendar.

7. After changing the values for all the keys, restart QuickTest Professional and record against your application to see if the problem occurs.

If the problem still occurs, contact Customer Support. The problem does not appear to be a conflict between the add-in and a control. Make sure you reference this article as something you have tried.

If the problem does not occur any longer, you know it was caused by a conflict between one of the ActiveX controls and the add-in. Set all of the values in the ProgIDs back to FFFFFFFF. Continue with step 8 to determine which control causes the problem.

8. Close QuickTest Professional, set the value for one ProgID to 0, and restart QuickTest Professional. See if the problem reproduces.

9. Repeat step 8 for each ProgID until you find the ProgID(s) that allow QuickTest Professional to record and replay without the hang or crash occurring.

If you want to keep track of further articles on QTP. I recommend you to subscribe via RSS Feed. You can also subscribe by Email and have new QTP articles sent directly to your inbox.

Please use QTP forum for posting QTP questions.

Check the up-to-date matrix for the currently supported versions of Active X by QTP (UFT).