Current Articles | Categories | Search | Syndication

Comments
by Robert Martin on Friday, October 10, 2008
Just one thing to say, just one thing:

HOORAY!

Honestly, this is a REALLY cool new feature. Not only will this resolve all the stuff about UseUnit or Uses clauses in the script source, but this will allow the sharing around of script source between non-developer automaters.

For that matter, I REALLY cheer because this restores a little trick that Eric Holton showed me back in TC3. The TC4 redesign removed that trick but now it's "officially" back and cooler than ever.

Thanks, Helen!
by Alexei Karas on Monday, October 13, 2008
And I would like to hope that this is one more (final?) step to the long-awaited Keyword Driven feature...

Thanks,
/Alex
by Helen Kosova on Monday, October 13, 2008
To Robert:

You are right, this feature makes creating shared script routines a lot easier. And what's more exciting is that script extensions can be used to accomplish a lot of other tasks! I can't even imagine all the things that can be done with them...

Best regards,
Helen
by Renaat Van Hende on Friday, January 23, 2009
It is a great feature and great post. I would like to see some gaps filled, otherwise I would not have asked this to you.

I have a set of shared libraries (common routines in several script units). Those common routines calls functions from other common script units.

I was wondering if this can be done for script extension. Think of this, you have several script units with //USEUNIT's and you make several TestComplete extensions of those scripts and supply corresponding XML files.

It occurs to me that I do see dependencies in the list of Script Extensions window. When I disable one of the extension, I got a warning telling me that there are other extensions that depend on the one I was about to disable.

Will we get the same behavior if we create TestComplete extensions with interdependencies?

If yes, what needs to be done for that?

Thanks in advance,
Renaat
by Helen Kosova on Monday, January 26, 2009
Hi Renaat,

TestComplete doesn't check dependencies between script extensions (though it does it for traditional compiled plug-ins). There's a scripting method that lets you check for required script extensions - aqEnvironment.IsScriptExtensionInstalled(...), but it works during the extension's execution only.

In your case, I recommend creating a single extension out of all of your common script units, so that dependent functionality gets enabled/disabled at once. The easiest implementation is to merge your common scripts into one and define one or more scripting objects that will provide access to common routines. It's still possible to have several source scripts for an extension, but in this case, calls to routines from other units must be made via newly defined objects (//USEUNIT references between source scripts in extensions are not allowed).

Nevertheless, you have a point about dependency checking. You can send an appropriate feature request to our support team (http://www.automatedqa.com/support/message.asp).

Best regards,
Helen
by syed on Friday, May 29, 2009
I would like to know if the script extension like the one mentioned in this post can implement an object defined in it alone or can it also be implemented for objects I am using in my scripts.

I mean...

In this case we are using the extension as,
StringUtils.AnyfunctionOrRoutine
where,
StringUtils is defined in the extention pack.

I would like know If i can do the same for say, a button object that is on the GUI.
like,
btnCommandOK.Click is what I normally write
Through the script extensions can I implement something like
btnCommandOK.CustomClick where CustomClick is one that ll be defined in my extension and in my CustomClick I may enhance a simple click with other checkpoints and logging messages etc.
by Helen Kosova on Friday, May 29, 2009
Hi Syed,
 
No, script extensions, just like ordinary TestComplete scripts, can't define custom methods on GUI objects. As a workaround, you can define functions that take GUI objects as parameters, e.g.:
 
MyUtils.CustomClick(ButtonObject)
 
However, the functionality that you described can be implemented by using TestComplete SDK, but currently this can done only for .NET and WPF controls.
 
Regards,
Helen
Click here to post a comment

AQA Products

TestComplete Automated testing made easy. Free trial. AQtime Everything you need to make your application fast and lean. Free trial. Automated Build Studio Transform error prone, complicated build and release tedium into a simple, clean automated process. Free trial.
AutomatedQA Home