Forum Discussion

smcmickle's avatar
smcmickle
Contributor
12 years ago

Different machines making different object names...

Hello again,



We just got a new coworker who is using TestComplete. At first, all the java tests worked great on her computer. Now it seems as if her TC doesn't recognize the objects. When she runs a test herself doing the same exact steps, the numbers of the variables will change.



Example::



Code that works on everyone's computer but hers::




c3c = javaw.frame0.RootPane.null_layeredPane.null_contentPane.C3C;

c3c.SgToolBar.ClickItem("Admin");





Then, when she tries to record that same action, it comes out as..




 



c3c = javaw.frame03.RootPane.null_layeredPane.null_contentPane.C3C;



c3c.SgToolBar.ClickItem("Admin");





We both have the same exact programs running, have both done a fresh install, fresh restart, both have exact same settings thanks to the import / export settings option. Any ideas why her variable names change?



Thanks!!!



-Sean




2 Replies

  • Also::



    If the variable HAS to change for whatever reason, is there a way to write a script that just makes sure the test has the correct variable names, no matter whose computer it is on?



    Thanks!
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Sean,


     


    Check the javaw.frame03 mapped object on the problematic computer in the Name Mapping editor. Maybe, the Index property is used to map it.