| || |
object mapping question
I am working with QTP 9.2 (and a .NET 2.0 Forms app that is being tested--I don't think this is relevant).
Virtually all of my app's controls (swfButton, swfCheckbox, swfEdit, etc) appear to QTP as residing in a single swfWindow, which is the main app, while to a user it appears to be a different functional area (the toolbox, the setup screen, etc.). This is due to the fact that the app designers always want the main app container and its top level pushbuttons (to get from one logical functional area to another) to encapsulate the functional area "workspace".
But the encapsulated functional area "workspace" is always seen by QTP as:
The ...blah.blah.blah... is deep, most often a combination of swfObject() and swfTab() objects that are ignored by QTP when it creates object defs in the OR, such that virtually all of my object hierarchy is "flattened" to:
This default QTP behavior is most often what I want, but not always.
In particular, the app uses a significant amount of swfTab() container objects that when clicked bring a specific swObject("unique name") container-like "workspace" into view. I have very carefully clicked on one of these container-like workspace objects when recorder and QTP places an object def into the OR.
Now I know I have prattled on, but here now is my question (I hope the preamble is not TMI...)
The swfObject() just recorded is now in the OR, laying there like a dead fish, in the form
swfWindow("The App").swfObject("unique name")
Is there a way that I can <u>map</u> this specific swfObject("unique name") in the OR to an swfWindow()?
I have been through all of the QTP docs and it does not appear this is possible. It seems that object mapping is restricted to an entire class (and then the mapping is further restricted to target on a standard Windows class).
But I would sure like to be wrong on this issue, such that someone more experienced could correct my ignorance.
-Thanks, Terry Horwath
Re: object mapping question
Terry that's strange, I have a number of "floating" (moveable, resizeable, closeable) windows within the main windows of a VB.Net application and when I record selecting a tab on 2 different child windows I get the following:
SwfWindow("Test Harness (Client:").SwfWindow("Test Sets - Reliable Messaging").SwfTab("TestSetControl").Select "NIS1-ETP41"
SwfWindow("Test Harness (Client:").SwfWindow("Test Sets - Synchronous").SwfTab("TestSetControl").Select "NIS4 - LRS"
Here's the settings I have for SwfWindow in Tools > Object Identification - select ".Net Windows Forms" from Environment drop-down & highlight SwfWindow
is child window
is owned window
One thing I have noticed is that the SwfTab on both windows has identical properties, that could be why it's using the full heirarchy.
There is a way round your problem (but I don't think you will like it), write your scripts in DP [img]/images/graemlins/wink.gif[/img]
Re: object mapping question
Would have preferred different info, but thanks for taking the time to provide feedback.
As for DP, that was my first choice but the customer wants me to use the OR, as the folks who will inherit this have no programming background (other than what I am going to teach them over the next few months). So OR it is.
I think my Object Rec settings are the same as yours, so I am not sure why QTP is ignoring the container I am interested in. (But probably because it is not needed for unique identification).