QTP uses the Visual Basic Scripting Edition (VBScript) scripting language, TestPartner is based on the Visual Basic for Applications (VBA), and RFT’s test script is produced as either a Java or Visual Basic.net application.
VBScript is a subset of the Visual Basic Programming language. The result of the slimming down process is a very small language that is easy to use. JavaScript can do all that VBScript can do and far more. So why use VBScript instead of JavaScript? Because VBScript is much easier to learn than JavaScript.
Visual Basic for Applications (VBA) is another subset of the Visual Basic Programming language for use with Microsoft Word, Excel, Access etc. While it contains a good many features not supported by VBScript, the basic syntax, or construction of the language, is very similar.
RFT is not the main focus for this blog, at least not yet, so for Java vs. VB.NET, you only need to know that Java is programming environment controlled by Sun, and VB.NET is developed by Microsoft.
As said above, both VBScript and VBA are subsets of Visual Basic (VB). The final release of VB was version 6 in 1998. Microsoft’s extended support ended in March 2008 and the designated successor was Visual Basic .NET (now known simply as Visual Basic)
After learning the history of the VB family and JavaScript, let us play a small game by writing the VBScript in a notepad. This is very useful if you do not want to bother to repeat the same thing over and over again.
Copy the following code into a notepad, and save it as kk.vbs, then double click on it, and see what it will do.
Dim fs, file, TSTnumber set fs = createobject( "Scripting.FileSystemObject" ) set file = fs.OpenTextFile( "RF.BAT", 2, true ) For TSTnumber=613 to 616 file.write "VsiColorModeRAW.exe tst-18-0" file.write TSTnumber file.write "\tst-18-0" file.write TSTnumber file.write ".raw.bmode tst-18-0" file.write TSTnumber file.write "\tst-18-0" file.write TSTnumber file.write ".raw.color tst-18-0" file.write TSTnumber file.write "\tst-18-0" file.write TSTnumber file.write ".raw.xml tst-18-0" file.write TSTnumber file.writeline "\Color" Next file.close set fs=nothing