Forum Discussion

Viji123's avatar
Viji123
Occasional Contributor
8 years ago

Auto complete is not working

Hi there,

 

Am using the Testcomplete for desktop automation. Am developing the script using Python. Its a WPF application.

 

The issue is -  Auto complete doesn't work most of the times(80%). Am facing hard time to script. 

Anyone else facing the same issue?

 

This is blocker issue!!

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    AutoComplete will only work if it knows what it needs to complete.

     

    For example, let's say I have this code:

     

    function getOnScreenObject(objectName) {
        return Aliases.myApp.WaitAliasChild(ObjectName, 10000);
    }
    
    function test1() {
        var myObject;
        myObject = getOnScreenObject('textbox');
        myObject. // At this point, AutoComplete won't work on MyObject because it does not have any context as to what myObject actually is.
    
    }

    This is just one example... but the basic rule is the same.  If you are trying to type out something and TestComplete can't detect what it is you're trying to reference, it will not be able to do an auto-complete of the objects, methods, and properties of the object.

     

    If you can post up an example of the code you're trying to edit that is not giving you autocompletion and perhaps some context of where this is happening in your test project, we should be able to help you.

     

     

    • Viji123's avatar
      Viji123
      Occasional Contributor

      Mainpage.py file

      ---------------------

       

      class A():
       create_btn = Aliases.myApp.ButtonCreate


       def main(self):
        self.create_btn

       

      Here the auto complete doesn't work. There is no auto complete suggestion for self.create_btn. So i tried like below

       

      create_btn = Aliases.myApp.ButtonCreate

       

      class A():
       
       def main(self):
        self.create_btn

       

      Still i didn't get any suggestion. But if i try to keep a dot after "Aliases.myApp.ButtonCreate." then i got suggestion.

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        I honestly don't know python syntax very well... but I don't believe that you're going to get any auto completion for anything using the "self" as a root.  There is no context of what "self" is at this point in the test creation in the TestComplete environment.