Newly installed qtp not recording

qtp

I had installed QTP 10 in windows xp, in a virtual machine. My application is web based. No additional add-ins required. No patches required either because XP, IE 7, and qtp 10 are compatible. My main OS is Windows 7 with IE 9. I don’t automate there. I only automate in XP.
My framework worked perfectly fine. I did not face any problems with object spy, object repository, or record and playback. My framework is completely descriptive programmed. My tests ran just like it should.
Recently my hard drive crashed. The tech support people had to rebuild my system. They gave me a new hard drive and built a new virtual machine. I had to re-install all my software, including QTP v10 in vmware.
I ran my framework, it worked fine. I stopped my test to add additional code and ran the test again. This time it did not work. It gave an error message that it could not identify the parent object. Then I used object spy.
It identified the objects on the web page as Window, and WinObject. I was confused as to why it was behaving this way.
I restarted my qtp. Used Object Spy again, this time it was recognizing objects on the same web page as Browser, Page, Webelements.
I did a simple record and playback to test it. It recorded my steps and played back the steps properly as it should. I re-recorded to add additional steps to the script, but this time it was not recording my steps.
I stopped the record and used object spy to see what was going on. This time it was identifying objects as Window/WinObject again.
I then checked Object repository. It had the FIRST recorded objects in the repository, but not the later recorded steps. I used OR to pick up objects but it was recognizing the objects on the web site as WinObjects.
What causes QTP to behave this way? I thought I would re-install QTP. I contacted HP. They gave me instructions on how to do a clean uninstall. I followed their steps and did a clean uninstall by regedit and delete those HKEY_USER…….. stuff.
I re-installed QTP with Full admin rights and everything. But I am still facing the same problem. QTP would work fine at the first record and playback and it would run my framework fine, but after that first run it would not work. It doesn't identify web applications. ANY web application, not just the one I have to automate.
1) It is NOT a problem with add-ins
2) It is NOT a patching problem
3) There is NO problem with the App I have to automate

I believed it was the virtual machine? Some problem with how they rebuilt it? Coincidentally, my co-worker is also facing the SAME problem with her QTP. BUT her computer didn't crash! SO I am clueless now about this problem.
What Can I do to solve this problem?

Thank you for reading this huge letter.

Best Answer

This is an answer I wrote before, updated to your situation:

Can you see the BHOManager class in IE?

Go to IE > Tools > Manage Add-ons, make sure BHOManager class 
(Browser Helper Object) from Mercury Interative Corporation is 
enabled.   

It is recommended to disable other add-ons, such as third-party toolbar, add- ons from anti-virus companies, etc. This is to make sure nothing is preventing QTP from hooking into the browser.

If this is all the case, you re-register the BHOManager again:

Close IE and all iexplore.exe processes in the task manager
Close QTP (or restart your machine)
Go to Start > Run, unregister and register BHOManager.dll: 
    regsvr32 -u c:\WINDOWS\system32\BHOManager.dll 
    regsvr32 c:\WINDOWS\system32\BHOManager.dll 

When this solves your second run, you know there is something wrong with the BHO in IE: They are not started correctly or they are refused the second time. Maybe a more strict IT policy or an eager virus scanner that removes all not recognized browser add ins.

Related Topic