mikev
13 years agoContributor
NameMapping, Mapped Objects & Aliases - 101
I'm new to TC, and have just found out something that I didn't quite expect. In designing and coding my test, the GUI (Java Application) was fairly static until today. I needed to update the GUI, and I ran the test. The GUI had new objects on it, which is fine. However, many of the objects that I have in the Aliases pane were no longer found. I thought that was kind of odd, and a little bit frustrating. As it turns out, the path to the objects (and by path, I mean in Java applications, you typically have objects laid out in some sort of form, panel, etc) was now changed because of the new object editions.
So here's what I think is going on, and I'm sure there's a better way to figure things like this out when the GUI changes. I notice that while learning objects, you must learn the entire path to that object, from Sys on down. When you are learning those objects, you have the option to "skip" the current object and only map (in the Aliases section) the objects that you plan on manipulating. So far, so good. Since my existing objects were not found, I learned one of them again, changing the name, and then I found out where TC thought it should be (Find Mapped Object). Turns out that the objects were now in a different pane (i.e. path) than before. The solution was to just drag the object to the right location in the tree. That's not so bad if you only have a few objects to do, but if you have a whole bunch, it's really time consuming and frustrating.
How do the rest of you handle GUI changes as they relate to the NameMapping? I'm pretty sure there's a better way to do what I've done, I just don't know what that is. The "skip" option really only means that you are not learning the object for the Aliases, but you must learn it for the Mapped Objects. I would think that if the description to the object that I want to manipulate is unique (like Name, AccesibleName, etc.) that it should not matter at all where on the application it exists. Is the only way around this is to use FindChild? I'm looking for some way that my objects will be recognized when the GUI changes.
So here's what I think is going on, and I'm sure there's a better way to figure things like this out when the GUI changes. I notice that while learning objects, you must learn the entire path to that object, from Sys on down. When you are learning those objects, you have the option to "skip" the current object and only map (in the Aliases section) the objects that you plan on manipulating. So far, so good. Since my existing objects were not found, I learned one of them again, changing the name, and then I found out where TC thought it should be (Find Mapped Object). Turns out that the objects were now in a different pane (i.e. path) than before. The solution was to just drag the object to the right location in the tree. That's not so bad if you only have a few objects to do, but if you have a whole bunch, it's really time consuming and frustrating.
How do the rest of you handle GUI changes as they relate to the NameMapping? I'm pretty sure there's a better way to do what I've done, I just don't know what that is. The "skip" option really only means that you are not learning the object for the Aliases, but you must learn it for the Mapped Objects. I would think that if the description to the object that I want to manipulate is unique (like Name, AccesibleName, etc.) that it should not matter at all where on the application it exists. Is the only way around this is to use FindChild? I'm looking for some way that my objects will be recognized when the GUI changes.