cancel
Showing results for 
Search instead for 
Did you mean: 

Navigating to a specific function in a script file TestComplete using CTRL-CLICK

SOLVED
Contributor

Navigating to a specific function in a script file TestComplete using CTRL-CLICK

Hello !

 

Regarding code navigation between functions located in different script files...

Is there something in the Test Complete setup to be changed for CTRL-Click to work in navigating between different functions in different scripts.

 

In my TestComplete instance this works.

In another instance CTRL-Click does not work.

 

https://support.smartbear.com/testcomplete/docs/reference/options/panels/code-editor/general.html

 

I have imported the functions necessary.

 

Regards,

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Navigating to a specific function in a script file TestComplete using CTRL-CLICK

Right... that's what I meant.  In that different project, are you using "\\USEUNIT" or "import".  I think, technically, it should work either way but I believe that there may be some issue with some of the parsing with the "import" methodology.


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.

Mysterious Gremlin Master
Extensions available
7 REPLIES 7
Community Hero

Re: Navigating to a specific function in a script file TestComplete using CTRL-CLICK

It depends, somewhat, on how you are linking the files, I believe.  What code language are you writing your scripts in? Is the other instance running the exact same project you are or is this a different project?  


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.

Mysterious Gremlin Master
Extensions available
Contributor

Re: Navigating to a specific function in a script file TestComplete using CTRL-CLICK

The test scripts are written in JavaScript.

There is a project on which the navigation works.

There is a different project where the navigation does not work.

 

The configuration displayed in the attached image was made.

 

Best Regards,

Community Hero

Re: Navigating to a specific function in a script file TestComplete using CTRL-CLICK

Right... that's what I meant.  In that different project, are you using "\\USEUNIT" or "import".  I think, technically, it should work either way but I believe that there may be some issue with some of the parsing with the "import" methodology.


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.

Mysterious Gremlin Master
Extensions available
Contributor

Re: Navigating to a specific function in a script file TestComplete using CTRL-CLICK

The project uses the Import Functions in the context of the Script.

Also, in the header of the script  there are require () statements, and the functions are exported from the script and made accessible to other scripts.

The call works, code compiles and runs, but only the instance that contains the functions displays the highlight, but not the function.

Community Hero

Re: Navigating to a specific function in a script file TestComplete using CTRL-CLICK

And the project that works... is it using the same method or is it using "\\USEUNIT"?


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.

Mysterious Gremlin Master
Extensions available
Contributor

Re: Navigating to a specific function in a script file TestComplete using CTRL-CLICK

In the project where this works '\\USEUNIT' is not used.

Community Hero

Re: Navigating to a specific function in a script file TestComplete using CTRL-CLICK

OK...  I'm not sure then what's going on.  If that option is checked in both environments, then the CTRL-CLICK should work in both.  That option, BTW, is a machine specific setting... so... I know this is a "duh" question, but make sure that it is clicked on BOTH machines.

In the meantime, something that you can try is doing a "repair" install on the machine where it's not working... see if that corrects things.  

 

Beyond that.... you may want to consider contacting support directly.


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.

Mysterious Gremlin Master
Extensions available
New Here?
Join us and watch the welcome video:
API Testing Mistake #2
APITestingMistake#2