Introduction
VB Script is a language for the Unified Function Testing tool UFT formerly called as Quick Test Professional (QTP) , to develop the automation tests.
Below are the Keywords available to write a statement in UFT. These Keywords helps you to make use in designing the code/script as per the requirements. The more Keywords you are familiar then it will become easy for you to design the code quickly and efficiently in turn you can get to know the depth of the knowledge very easily. Once you are familiar with VB script, it helps in creating macros using excel sheets; to know more information refer macros using excel sheets section/tab/link.
For your easy-of-use, we can segregate the VB Script Keywords into following sections.
Category | Keywords |
Array handling | Array, Dim, Private, Public, ReDimIsArray Erase LBound, UBound |
Assignments | Set |
Comments | Rem or ' (Aphostophy) |
Constants/Literals | Empty, Nothing, Null, True, False |
Control flow | Do...Loop, For...Next, For Each...Next, If...Then...Else, Select Case, While...Wend, With |
Conversions | Abs, Asc, AscB, AscW Chr, ChrB, ChrW, CBool, CByteCCur, CDateCDbl, CIntCLng, CSng, CStrDateSerial, DateValueHex, OctFix, IntSgn, TimeSerial, TimeValue |
Dates/Times | Date, TimeDateAdd, DateDiff, DatePartDateSerial, DateValueDay, Month, MonthNameWeekday, WeekdayName, YearHour, Minute, SecondNow, TimeSerial, TimeValue |
Declarations | Class, Const, Dim, Private, Public, ReDimFunction, SubProperty Get, Property Let, Property Set |
Error Handling | On Error, Err |
Expressions | Eval, Execute, RegExp, Replace, Test |
Formatting Strings | FormatCurrency, FormatDateTime, FormatNumber, FormatPercent |
Input/Output | InputBox, LoadPicture, MsgBox |
Literals | Empty, False, Nothing, Null, True |
Math | Atn, Cos, Sin, TanExp, Log, SqrRandomize, Rnd |
Miscellaneous | Eval Function, Execute Statement, RGB Function |
Objects | CreateObject, Err Object, GetObject, RegExp |
Operators | Addition (+), Subtraction (-)Exponentiation (^) Modulus arithmetic (Mod) Multiplication (*), Division (/)Integer Division (\) Negation (-) String concatenation (&) Equality (=), Inequality (<>)Less Than (<), Less Than or Equal To (<=)Greater Than (>) Greater Than or Equal To (>=) Is And, Or, XorEqv, Imp |
Options | Option Explicit |
Procedures | Call Function, SubProperty Get, Property Let, Property Set |
Rounding | Abs, Int, Fix, RoundSgn |
Script Engine ID | ScriptEngine, ScriptEngineBuildVersion, ScriptEngineMajorVersion, ScriptEngineMinorVersion |
Strings | Asc, AscB, AscWChr, ChrB, ChrWFilter, InStr, InStrBInStrRev Join Len, LenBLCase, UCaseLeft, LeftBMid, MidBRight, RightBReplace, Space, Split, StrComp, String, StrReverse, LTrim, RTrim, Trim |
IsArray, IsDate, IsEmpty, IsNull, IsNumeric, IsObject, TypeName, VarType, Variants |
No comments:
Post a Comment