Reply
Highlighted
Occasional Contributor
Posts: 14
Registered: ‎10-21-2016

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!!

Posts: 4,233
Topics: 37
Kudos: 1,495
Solutions: 307
Registered: ‎11-30-2009

Re: Auto complete is not working

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.

 

 


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Extensions available
Community Leaders Program
Occasional Contributor
Posts: 14
Registered: ‎10-21-2016

Re: Auto complete is not working

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.

 

Posts: 4,233
Topics: 37
Kudos: 1,495
Solutions: 307
Registered: ‎11-30-2009

Re: Auto complete is not working

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.   


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Extensions available
Community Leaders Program
Try QAComplete Now