Ask a Question

Can NOT use python Code Completion

SOLVED
hisense
Occasional Contributor

Can NOT use python Code Completion

How can I enable Python built-in method code completion in TestComplete Code Editor?So far,It just pop up TestComplete built-in things.
1 ACCEPTED SOLUTION

Accepted Solutions
TanyaYatskovska
Community Manager

Re: Can NOT use python Code Completion

Hi @hisense,

 

TestComplete does provide the Code Completion only for the TestComplete objects. Thanks for submitting a feature request to implement the Code Completion feature for Python objects. @Lagencie, feel free to vote it up:

https://community.smartbear.com/t5/TestComplete-Feature-Requests/Request-for-Code-Completion-feature...

 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

6 REPLIES 6
tristaanogre
Community Hero

Re: Can NOT use python Code Completion

What are you trying to do in the way of code completion?  Some code sample would be helpful.  The reason I ask is that there are certain things that may not be able to popup in "intellisense".  Methods within classes, for example.  While I know that the "standard" practice with Python is to write classes and such, that is not necessary with TestComplete Python scripting so you can define your methods and such without needing to be in a class.


Robert Martin
[Hall of Fame]
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.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
hisense
Occasional Contributor

Re: Can NOT use python Code Completion

@robert for example, Step1:I defind a list with python script. lst = [1,2,3,4] Step2:I input "lst." in code editor,if i am using "pycharm",it will pop up the below screenshot and it will show the native function.But NOT in testcomplete code editor
hisense
Occasional Contributor

Re: Can NOT use python Code Completion

 
Lagencie
Frequent Contributor

Re: Can NOT use python Code Completion

Can only agree to this

 

IntelliSense does not work at all with python. It works for the TestComplete internal stuff like Project.Variables.... but not for python code in either forms.

 

newVariable = "test"

gives you not a single option with newVariable.  (either pressing CTRL + SPACE , nor automatically)

 

same goes for other things like the mentioned list or even things like:

 

import re

escapedRegex = re.escape("Test%#$@manual")

gives no option when pressing re.     but it works in the end, but you have to either write the code in another editor or know exactly what to write.

tristaanogre
Community Hero

Re: Can NOT use python Code Completion

Just an additional note, this is the same for any language used by TestComplete.  It is the nature of the tool, really.  You can write and execute code in particular languages, however, the parser and underlying compiler are only present in runtime.  

 

For example, take the below JavaScript

 

function boo(){
    var me;
    me = 'Testing';
    
    
}

If you type me. nothing weill come up.  In JavaScript compilers, you may get something like "length" or "indexOf" or similar things.  TestComplete will not display these because it is not anative JavaScript compiler. 

 

Again, keep in mind the nature of what TestComplete is.  It is not an application compiler.  It is a test automation tool which allows you to use a variety of languages for writing scripts for execution.  But, at it's core, it's a test automation tool.


Robert Martin
[Hall of Fame]
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.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
TanyaYatskovska
Community Manager

Re: Can NOT use python Code Completion

Hi @hisense,

 

TestComplete does provide the Code Completion only for the TestComplete objects. Thanks for submitting a feature request to implement the Code Completion feature for Python objects. @Lagencie, feel free to vote it up:

https://community.smartbear.com/t5/TestComplete-Feature-Requests/Request-for-Code-Completion-feature...

 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: