Forum Discussion

ray_mosley's avatar
ray_mosley
Frequent Contributor
13 years ago

Object Spy results not usable

When I record these actions:

1) select new icon, which pops up a menu of two items

2) select one of the items

Then I get the following statements:

      Aliases.topsSchedule1.fmAPPSelectResource.sbFltNew.Click(27, 18);

      Aliases.topsSchedule1.fmAPPSelectResource.pnTool.pnNew.PopupMenu.Click("Equipment / Service");



If I try to use the Object Spy Point and Fix to get the full object path, I get only:

      Sys.Process("topsSchedule").Window("#32768", "", 1)



Why can't Object Spy return the fullname of "Aliases.topsSchedule1.fmAPPSelectResource.pnTool.pnNew.PopupMenu"?

     

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Harlan,



    > Why can't Object Spy return the fullname of "Aliases.topsSchedule1.fmAPPSelectResource.pnTool.pnNew.PopupMenu"?



    My guess is that this is because the control was not mapped yet at the moment when you explored in in the Object Spy. I think so because usually the mapped name can be seen as the value of the MappedName property.
  • ray_mosley's avatar
    ray_mosley
    Frequent Contributor
    I understand that the Object Spy point and fix method does not have everything mapped.  However, it apparently can potentially provide that. 



    In my example, the recorded values are:



          Aliases.topsSchedule1.fmAPPSelectResource.sbFltNew.Click(27, 18);



          Aliases.topsSchedule1.fmAPPSelectResource.pnTool.pnNew.PopupMenu.Click("Equipment / Service");







    If I try to use the Object Spy Point and Fix to get the full object path, I get only:



          Sys.Process("topsSchedule").Window("#32768", "", 1)



    I can use the Object Spy to get the fullname value of the alias object  Aliases.topsSchedule1.fmAPPSelectResource and replace that in my recorded script.  How can I resolve the rest of the alias path pnTool.pnNew.PopupMenu, because the statement

        Sys.Process("topsSchedule").Window("#32768", "", 1).Click("Equipment / Service");

    fails in replay?

     

  • Hello Harlan,


     


    Most probably, the fact that TestComplete records actions with the Aliases.topsSchedule1 mapped object indicates that there are two instances of your application (topsSchedule.exe) running in your system and you record actions with the second instance. In this case, you just need to modify mapping criteria of the object to work with one process and make sure that you run only one instance of your application at a time. If your application is designed to invoke two topsSchedule.exe processes at a time, you need to modify the criteria to make sure that TestComplete works with the correct instance of the process.