jimsmith_1
13 years agoContributor
Help with Name Mapping
One of the web applications that I am testing uses frames that are named dynamically.
So that my tests can find objects within these frames, I have inserted the * wildcard in the variable part of the name in the object mapping
ObjectIdentifier value. This works well. My tests run as expected, finding all objects in the frame regardless of the frame name that is generated by the application.
There is one unfortunate side effect to this approach however...
When I record tests which interact with objects in the frame that are not yet mapped, TestComplete ignores my existing frame mapping (with the * in the ObjectIdentifier value) and creates a new frame mapping with the full ObjectIdentifier name value. I then have to insert the * wildcard in the ObjectIdentifier value of this new frame mapping so that the objects will be found when the test is run.
I now have the frame mapped 9 times. This figure is likely to grow. Each of these mappings contains some of the objects with which my tests interact. I suppose that Testcomplete has to search through each of these frame sub-trees when trying to identify an object. In any case, it seems to find the objects OK.
See attached screen shot.
The problem I have is trying to find objects myself, I have to search through each of the 9 sub-trees to find anything.
So, my questions are...
Is what I am doing the best approach?
Is there any way of merging my 9 frame mapping sub-trees together so that I end up with just one sub-tree for the frame?
So that my tests can find objects within these frames, I have inserted the * wildcard in the variable part of the name in the object mapping
ObjectIdentifier value. This works well. My tests run as expected, finding all objects in the frame regardless of the frame name that is generated by the application.
There is one unfortunate side effect to this approach however...
When I record tests which interact with objects in the frame that are not yet mapped, TestComplete ignores my existing frame mapping (with the * in the ObjectIdentifier value) and creates a new frame mapping with the full ObjectIdentifier name value. I then have to insert the * wildcard in the ObjectIdentifier value of this new frame mapping so that the objects will be found when the test is run.
I now have the frame mapped 9 times. This figure is likely to grow. Each of these mappings contains some of the objects with which my tests interact. I suppose that Testcomplete has to search through each of these frame sub-trees when trying to identify an object. In any case, it seems to find the objects OK.
See attached screen shot.
The problem I have is trying to find objects myself, I have to search through each of the 9 sub-trees to find anything.
So, my questions are...
Is what I am doing the best approach?
Is there any way of merging my 9 frame mapping sub-trees together so that I end up with just one sub-tree for the frame?