VBScript Operators

VBScript Operators

VBScript Operators, Arithmetic operators, Comparison or Relational Operators, Logical Operators, and Operator Precedence in VBScript. Operators in VBScript Operators are used to performing the mathematical, comparison, and logical operations. Categories of operators: 1. Arithmetic Operators 2. Comparison Operators 3. Logical Operators * Concatenation operators (Part of Arithmetic Operators) Operator precedence: Operator precedence is VBScript operator … Read more

VBScript Tutorial

VBScript Tutorial

VBScript Tutorial, Environment, VBScript Syllabus, Variables, Control Flow, Functions, Automation Objects, and Write & Run VBScript Programs. VBScript began as part of the Microsoft Windows Script Technologies, launched in 1996. VBScript (“Microsoft Visual Basic Scripting Edition”) is an Active Scripting language developed by Microsoft that is modeled on Visual Basic VBScript stands for Visual Basic … Read more

VBScript Excel Object Model Part-2

VBScript Excel Object Model Part-2 1) Read Test data from Excel file and perform Data driven testing for Login Functionality. And write/export Test Result and Error Message to the same file. Dim objExcel, objWorkbook, objWorksheet, RowsCount, i Set objExcel = CreateObject(“Excel.Application”) Set objWorkbook = objExcel.Workbooks.Open(“C:\Users\G C REDDY\Desktop\January.xlsx”) Set objWorksheet = objWorkbook.Worksheets(1) RowsCount = objWorksheet.UsedRange.Rows.Count objWorksheet.Cells(1, … Read more

VBScript Database Objects

  VBScript Database Objects 1) Database Connection Object It is used to connect to Databases. (* Database Connection String only varies from One Database to another) Create Database Connection Object Set variable = CreateObject(“Adodb.Connection”) 2) Database Recordset Object It is used to perform operations on Database tables (records) Create Database Recordset Object Set variable = … Read more

Error Handling and Debugging Tests in UFT

Error Handling and Debugging Tests in UFT 1) Error Handling using VBScript: Handling expected and unexpected errors. Expected Errors Whenever we use invalid input then we expect errors. Note: We use invalid input for negative testing. Unexpected Errors i) Resource Missing ii) Resource Response iii) Insufficient Resource. How to handle Errors i) Using Conditional statements … Read more

 User Defined Functions in VBScript

 User Defined Functions in VBScript  VBScript Functions > In Structured Programming (Ex: C Language) we use Functions (Built-in and user defined). > In Object Oriented Programming (ex: Java) we use Methods (Built-in and user defined). > In VBScript we use Functions and Methods (Object based language). What is Function? A reusable code. When we choose … Read more

VBScript Built in Functions

VBScript Built in Functions 1) Asc Function It returns ANSI character code for first letter of a string or number. ‘A to z (65 to 90) ‘a to z (97 to 122) ‘0 to 9 (48 to 57) Example: Dim a a =”ABCD” Msgbox Asc(a) ’65 Msgbox Asc(“A”) ’65 Msgbox Asc(“Z”) ’90 Msgbox Asc(“a”) ’97 … Read more

VBScript FileSystemObject

VBScript FileSystemObject File System Operations i) What is Computer File System? It is a feature of Operating system used to work with Drives, Folders and Files. ii) Examples for File System Operations Create a Folder Copy a Folder Delete a Folder Create a Text file Delete a Text file Read data Write data Comparisons Search … Read more

VBScript Tutorial 6

VBScript Tutorial 6 (VBScript Built in Functions Part-2, File System Operations part-1) I) VBScript Built in Functions Part-2 20) LCase Function Converts Upper case values to lower case. Ex: Dim val val = “HYDERABAD” Msgbox LCase(val) ‘hyderabad Msgbox LCase(“HYDERABAD”) ‘hyderabad Msgbox LCase(“hyderabad”) ‘hyderabad Msgbox LCase(“HYDerabad”) ‘hyderabad Msgbox LCase(“HYD123”) ‘hyd123 Msgbox LCase(123) ‘123 —————————- 21) UCase … Read more

UFT Class 29

UFT Class 29 (VBScript File System Operations) > What is Computer File System? It is a feature of Operating System, used to work with Drives, Folders and files. Computer understands things in terms of files only, Computer point of view everything is file. > Examples for File system Operations Create a folder Copy a folder … Read more