Forum Discussion

lakshmi0902's avatar
lakshmi0902
Occasional Contributor
15 years ago

Windows Functional Testing

Identifying the objects -



Name Mapped objects used in the script for the window application is not recongnized by Test Complete in the later stages. If this is the case how do I go ahead with the project to script all the tcs.



Eg: -



function Test1()

{

     var  dockTabControl;

     dockTabControl = Aliases["MainForm"]["workspaceContainer"]["OrderEntry"]["DockTabControl"];

     dockTabControl["ClickTab"](0);

     dockTabControl["DockTabPage"]["DockContainer"]["toolStripContainer"]["ToolStripContentPanel"]["OrderEntry"]["pnContainer"]["AbbreviatedOrderPanel"]["simpleTicket"]["Click"](450, 21);

}



This is a recorded script for just clicking on a window dock container. Once I close and reopen my application, test complete is not recognizing it back. Please help me how this will work.



Lakshmi

9 Replies

  • Hi,



    Check the Name Mapping scheme. Most probably, the problematic object is mapped by properties whose values change from run to run.
  • lakshmi0902's avatar
    lakshmi0902
    Occasional Contributor
    Thanks a lot for the reply...



    I had got through that problem by going through help...



    While scripting for windows application, if the window is split into many components and the each component is placed in one position. I had mapped the objects.



    But, when i try to move the position of the object and then again try to spy the object from namemapping, applicaiton says "underlying object doesnot exist"



    How can i get thru with this problem? Please have a look at the attachment for my application screenshot.



    Lakshmi...
  • Hi Lakshmi,


    Did you use coordinates or some other properties which store the objects' positions to map the objects? If so, note that the approach is unreliable and I strongly recommend that you use other, more reliable properties (for example, native control IDs or some properties which store the displayed text) in your Name Mapping scheme.

  • lakshmi0902's avatar
    lakshmi0902
    Occasional Contributor
    Hi Allen,



    I did not use any coordinates also i could not find the property "NativeControlObject ID" which you mentioned.



    One more scenario is like this: -



    I have a similar/same object in two different docks(which are placed as tabs) of same panel/dock. This is also one which im not able to highlight once i change the focus to another tab.



    Please have a look at the screenshot.



    -laks.
  • Hi,



    By what exact properties and values are the problematic objects mapped?
  • lakshmi0902's avatar
    lakshmi0902
    Occasional Contributor
    The object "button3" is mapped with NativeClrObject.Name (by default).



    The same object is lying in both the tabs. I want to focus the button by setting the tab focus and click the button. Is it possible?





    -laks
  • Hi,



    What exact value is stored in your NM scheme for the NativeClrObject.Name property?
  • lakshmi0902's avatar
    lakshmi0902
    Occasional Contributor
    The DockCointainer name itself is stored for NativeCrlObject....in screenshot....