Ask a Question

Appending code to an existing Script not working

SOLVED
JohnSnikers
Occasional Contributor

Appending code to an existing Script not working

Hi,

 

My problem is (my expired) Trial and Purchased version of TestComplete seems to be working differently..

Although they are the same version: 12.60.5545.7

 

I would like to record/append script to an already existing function but it seems not possible.

In trial version I just clicked into one of my scripts line and Pressed 'Record Script' -> recorded and when I pressed 'Stop' it generated the code right below the already recorded code.

In the purchased version it will be generated into another function!!

I know I can copy-paste the new function's code into the existing one but it is really inconvenient....

 

It is really frustrating there was a good simple feature in the trial version which convinced us to purchase the product and afterwards it is being removed despite of being the exact same version as the trial version...

 

I found that the 'Always start a new script' checkbox has been removed in 10.3. But the funny thing is, the trial version functioned like it would be still there 2 months ago.. (In today's trial version it's also missing...)

 

Im not sure anyone had a workaround to this problem, but maybe some has a suggestion.

1 ACCEPTED SOLUTION

Accepted Solutions
JohnSnikers
Occasional Contributor

Re: Appending code to an existing Script not working

If anyone had the same issue, the offical response is the following:

"This functionality was removed in one of the previous releases.
Good news is that it should be returned in our next release that is planned for January."

 

View solution in original post

7 REPLIES 7
vthomeschoolmom
Super Contributor

Re: Appending code to an existing Script not working

JohnSnikers
Occasional Contributor

Re: Appending code to an existing Script not working

Yea and the feature was implemented years ago and now it's missing again...

tristaanogre
Community Hero

Re: Appending code to an existing Script not working

I just tried it.   Using a JavaScript project, I clicked my cursor so that it was inside the braces of a method

 

function blah(){
Log.Message('blah');
//cursor here

}

When I clicked the button to record script and recorded an action, it added the action to that function.

 

If I clicked in my script unit so that the cursor was outside of all the function, recording prompted to create a new function.

 

So... it's working for me for JavaScript at least.  Please confirm what code language you're using... it could be that something syntax wise may be different for you.


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
JohnSnikers
Occasional Contributor

Re: Appending code to an existing Script not working

I use JavaScript as well..

If I click into the //cursor here line and press record script, a 'Select Script Unit' window pops up. 

Which as I recall should not pop up.

tristaanogre
Community Hero

Re: Appending code to an existing Script not working

I'm not sure what to say.  Works fine on this end.

I'd suggest you contact SmartBear support directly.  Could be that there's something missing in your set up. 

 

https://support.smartbear.com/message/?prod=TestComplete


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
JohnSnikers
Occasional Contributor

Re: Appending code to an existing Script not working

If anyone had the same issue, the offical response is the following:

"This functionality was removed in one of the previous releases.
Good news is that it should be returned in our next release that is planned for January."

 

JohnSnikers
Occasional Contributor

Re: Appending code to an existing Script not working

 Thank you for your help btw

cancel
Showing results for 
Search instead for 
Did you mean: