Hi all
Just thought I'd throw something else into the mix. I've been using TestComplete for a few years now and always used VBScript without any difficulties. I should say at this stage that we use it to test a Windows based desktop application and not a Web site.
Since taking on a couple of new testers, we decided to switch to JScript and for the most part it's as easy to learn as VBScript, if somewhat confusing for the traditional OO programmer!!
Anyway, one small, but I feel, very important aspect, is that currently, TestComplete uses version 3 of the ECMA standard (I think that's right), which means that something like the "use strict" statement doesn't work. For those of you who don't know what this is, I'll start by describing the "Option Explicit" statement, as used in VBScript, which does work in TestComplete:
When creating scripts, it's all too easy to make typos, this can lead to really hard to spot bugs in the script where the typo involves a variable name. In this instance, the system stops and reports that the variable has not yet been declared, thus making its correction a very simple one. However, in JScript rather than crashing out with a 'variable not declared' error, the system simply creates a new global variable and works with that.
The "use strict" statement only came into being from version 5 of the ECMA standard, in other words, it has no effect in TestComplete. I only found this out when trying to explain its use to a colleague, only to find that it didn't work. Since such errors as described above are easily made, this simple little statement can prove to be invaluable in helping to write stable/structured scripts, but alas, is not yet available in TestComplete.
I have read many posts previously in relation to getting TestComplete up to date with what is often referred to as 'Modern JavaScript', and am now beginning to understand what all the fuss is about.
Again, I'm not wishing to influence anyone's choice of scripting language (we now use JScript ourselves), but I have to say that I have never encountered any issues with VBScript and where it does have limitations compared to JScript, I always found that the workarounds are very simple and straight-forward to implement. I, therefore, disagree that it's ghastly (sorry Paul). With JScript, I have to say that I do much prefer the syntax - it looks 'cleaner' than that of VBScript, however, I am not aware of any workaround for the "use strict" issue, except to ensure that you don't make any typos!!
Regards
Stephen.