I am learning objects into object repsitory using add objects to local button as I can not run and record my application for now. If I record, only clicked coordinates are shown.
Anyways, now the problem is if I close my application and reopen, then in object repository, if I click Locate in Repository button, the object I learned doesn't get located in object repository. It would locate the first time before I close the application. I am using qtp 9.2, .net 3.0
Analog recording mode can solve this kind of problem, but most of the time it's like fixing a sore toe by cutting off your foot.
Analog recording is not easily maintainable, and will always fail if your developer moves any stuff around in the next build. And for web applications, analog recording fails as soon as you change browser settings.
Oh so many things can go wrong with analog recording.
Are you sure you are using the right .net add-in? Is the add-in enabled? Are you launching QTP before you launch your application?
If it's none of that, then maybe you can post an example, like what you see in object spy when you look at one of these objects, and what gets stored in the object repository when you add the object, and what you see in your script when you record yourself using that object.
I know analog recording is quite pain in the neck. I have right .net addin enabled, also I open qtp before the application in test. The problem is qtp doesn't recognize the property toolbox in the application. In that property tool box, there are many edit boxes where I input some data. So here is my code.
swfwindow("Centricity Enterprise").SwfToolbar("_mainToolStrip").Press("T emplateDesignerComponent")
swfwindow("Centricity Enterprise").SwfToolbar("_mainMenuStrip").Press("N ew Template")
SwfWindow("Centricity Enterprise").SwfTab("MainWorkspace").Select 0
Window("Centricity Enterprise").SwfObject("SwfObject").SwfObject("Pro pertyGridView").Click 75,7
Window("Centricity Enterprise").SwfObject("SwfObject").SwfEdit("SwfEd it").Set "Patient number 1"
I am learning that property toolbox manually, which automatically brings Window object in the repository. But the SwfEdit and SwfWindow are recorded. The error message I get is :-
"Cannot find the "PropertyGridView" object's parent "SwfObject" (class SwfObject). Verify that parent properties match an object currently displayed in your application."
One important thing-It would run first time when I have same window opened when I recorded or when I manually put objects. I guess the problem is with Windows's hwnd property which changes everytime I open the application window.