Forum Discussion

bknutson's avatar
bknutson
Contributor
8 years ago

Recording option for "p.", "w.", etc, compared to variable object names

Hello,

 

This should be easy but for the life of me I can't find the setting.

 

Where/what is the setting that changes script recordings from recording variables using the older default 'p' for processes, 'w' for windows, etc., to using the name or type of object for the variable name?

 

I hope that makes sense.

 

Thanks

Brad

  • The "Smart Variable Option" was added in TestComplete 7.0 based upon version history.  Later on, in version 10.3, that option was removed in favor of always using "smart variables".  

  • Could you give us a screenshot?  It helps if we can see what you are talking about.

    • bknutson's avatar
      bknutson
      Contributor

      Yes, I guess it is somewhat of a question that goes back many versions but,

      way back in the day, when recording, it would declare the variables using 'p', 'w', 'w2' etc., such as in:

       

      Sub Test4
        Dim p
        Dim w
        Dim w2
        Set p = Aliases.Sys.MyProgram
        Call p.frmMain.MainMenu.Click("File|Version Info")
        Set w = p.VBObject("dlgVersion")
        Set w2 = w.VBObject("vsfVer")
        Call w2.Click(73, 105)
        w.VBObject("cmdClose").ClickButton
      End Sub

       

      In later versions, it started declaring the variables with names/types  (control, control2, etc). 

       

      Sub Test1
        Dim MyProgram
        Dim control
        Dim control2
        Set MyProgram = Aliases.MyProgram
        Call MyProgram.frmMain.MainMenu.Click("File|Version Info")
        Set control = MyProgram.dlgVersion
        Set control2 = control.vsfVer
        Call control2.Click(64, 73)
        control.cmdClose.ClickButton
      End Sub

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        I think, in later versions, that entire option has been deprecated.  You either record with TC creating variables based upon object type... or you don't record with those variables at all.  There's no longer an option for the P's and W's.

         

        (BTW, I remember those days... AQTest version 1.51 was when I started using that stuff and had P's and W's all over the place...)