cancel
Showing results for 
Search instead for 
Did you mean: 

Testcomplete version 14 still do not support code alignment

SOLVED
Highlighted
Super Contributor

Testcomplete version 14 still do not support code alignment

TestComplete version 14 still do not support code alignment 

for e.g. if we we use use for loop and then if nested statement inside the for loop loop we need the braces should get aligned properly. It is becoming difficult when the automation code is getting complex day by day and the codes lines ar getting longer .

 

Thanks

Nishchal

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Testcomplete version 14 still do not support code alignment

You just need to load this script extension: https://drive.google.com/uc?export=download&id=0B1x_73bHRc2Jcm8wbTJ2dUpZQTQ

 

And it will show up under the drop down with Clipboard Checkpoint and Manual Checkpoint in your tool bar. Click that in an open script editor and it will auto format the code for you. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
10 REPLIES 10
Community Hero

Re: Testcomplete version 14 still do not support code alignment

There is a code formatter script extension somehwere here on that allows you to auto format javascript. If that's the language you're using I can dig that up and attach it. You couls also use some other linter integrated with your source control auto format the files on commit. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Super Contributor

Re: Testcomplete version 14 still do not support code alignment

@cunderw 

I am using Java script . Ok how does it work?

 

Thanks

Nishchal

Community Hero

Re: Testcomplete version 14 still do not support code alignment

You just need to load this script extension: https://drive.google.com/uc?export=download&id=0B1x_73bHRc2Jcm8wbTJ2dUpZQTQ

 

And it will show up under the drop down with Clipboard Checkpoint and Manual Checkpoint in your tool bar. Click that in an open script editor and it will auto format the code for you. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Super Contributor

Re: Testcomplete version 14 still do not support code alignment

@cunderw 

Do I need to highlight the code in code editot ? Or Just open the script in TestComplete editor is enough ?

 

Thanks

Nishchal

Community Hero

Re: Testcomplete version 14 still do not support code alignment

Just opening it is enough. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Super Contributor

Re: Testcomplete version 14 still do not support code alignment

@cunderw 

 

Ok I am seeing the impact of this. But there is no impact on the spaces bewteen the code lines ?

 

Thanks

Nishchal

 

Community Hero

Re: Testcomplete version 14 still do not support code alignment

If you extract the extension you can modify the source files to customize how it formatts things. 

 

You could also open the files in something like VSCode or Sublime text and use any of the number of extensions available for JS formatting. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Super Contributor

Re: Testcomplete version 14 still do not support code alignment

@cunderw 

The extension file just get copied to the location Testcomplete\bin\Extensions\ScriptExtensions

 

It do not allow me to extract whenever i click on the JSFormat extension it just ask to install

 

 

 

Community Hero

Re: Testcomplete version 14 still do not support code alignment

It's just a renamed zip file that you can extract:

 

 See https://support.smartbear.com/testcomplete/docs/working-with/extending/script/deploying.html for more information. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
New Here?
Join us and watch the welcome video:
Top Kudoed Authors