I was trying to add various objs of an application to the Object Repository. The app was created in C#. I have just the .NET Add-in loaded. At first, it saw everything was a class Window object. Somehow, I was able to learn the app with class swfWindow. At this point, it recognized buttons, tab objects, checkboxes, etc which was great. Just for curiosity, I was trying the different Add-ins and now, even when I go back to loading just the .NET Add-in it sees the entire app as a Window object again. What happened? What should I do in general when working with an app created using C#?
Stick with one add-in. If you use one add-in then di-select it and choose another the script will not run. So stay with what it was recorded with. I usally document in the script which add-in was used to execute the script.
Alan, you did not post versions of your QTP and .NET add-ins and info on your Operating system. In general, when this happens, make sure:
1. You install the .net framework first before installing .net add-in. 2. Patches if any applicable to your versions of QTP / .NET add-ins are all installed. 3. Launch QTP before launching your application under test.
Yes, if it recognizes them as SwfObject etc, your .NET add-in is loaded and working.
You say you have .NET 3.0 framework installed. a) What is your QTP version and b) what version of .NET runtime is your application using? c) Also, is your application WPF based? If so, are you loading WPF add-in as well?
Alan, you are probably noticing this. Can you confirm? When you bring up QTP with .NET add-in loaded and then the application, at first it recognizes everything as standard Windows Objects...but if you try to "record" anything, it starts recognizing everything from then on with Swf....class as it should have in the first place.
Alan, can you do this? Start QTP with .NET add-in loaded, start the application, spy on the main window of the application as well as any other standard control like a button etc, and post screenshots of what the Object Spy sees in each case.
All set. Attachment shows shot of version and .NET add-in selected, then shots of how QTP sees the main window and a few different objects, then a shot of the original Swf objects that are no longer found.
Alan, your add-in manager dialog does not look right. Where are the default add-ins that are supposed to be there? ..like VB, ActiveX etc..I know you may not need those for your application. But, it means that during installation, these add-ins were omitted somehow and hence QTP cannot be considered installed properly. Please uninstall completely and go through custom installation procedure and make sure the default set up is not modified in anyway except for the addition of .NET add-in.
After re-installing QTP9.5, I still don't aee those .bat files. I have the files before and after them based on the screenshot you attached but not the .bat files. The only .bat files I have in the bin dir are:
Alan, I use QTP 9.5 and I can tell you for a fact those .bat files do not exist in 9.5. What you are seeing is fine. What you may not be paying attention to is one of my posts above where I mentioned your installation is not right based on how your add-in manager dialog looked like. Can you read that again and attempt what I suggested? By the way, when I uninstall, I restart after the uninstall, get rid of HP folder, get rid of Mercury Interactive folder under Program files\Common Files, get rid of Mercury Interactive (entire key hierarchy) in both HKLM and HKCU in registry and restart again.
Alan, Krishna is right there are no batch files in QTP9.5 .
The batch files registers all the Dll files that QTP has .I installed QTP9.5 trial version on a different machine and copied over the two .bat files(from QTP9.2) to the bin folder of QTP 9.5 and when I ran them it registered all the files that QTP had.
Prob if you haven't uninstalled QTP yet you can try this .Copy these files to the bin folder of your QTP and run them.
Hi Alan, Can u try this.We are currentlu working on QTP 9.0. Go to Automation Menu,select Record and run settings.In Record and run settings Dialog box select "windows Apllications" tab.Then select radio button next to the "Record and run test on any open windows-based application".