Blog

Introduction to VBScript

Microsoft Visual Basic Scripting (VBScript) Language brings active scripting to a wide variety of environments, including Web client scripting in Microsoft Internet Explorer and Web server scripting in Microsoft Internet Information Service (IIS).

Microsoft Visual Basic Scripting (VBScript) Language brings active scripting to a wide variety of environments, including Web client scripting in Microsoft Internet Explorer and Web server scripting in Microsoft Internet Information Service (IIS).

Environments Where VBScript Can Run

VBScript is a client-side scripting language. It is a light version of Microsoft Visual Basic. The syntax of VBScript is very similar to that of Visual Basic.

VBScript cannot run its code on its own. It needs a bigger programming language to host it. Right now, there are 3 environments where VBScript can run.

  • IIS (Internet Information Server) – Microsoft’s web server
  • WSH (Windows Script Host) – The native hosting environment of the Windows OS
  • IE (Internet Explorer) – The simplest hosting environment we can use to run VBScripts

Disadvantages of VBScript

  • The main disadvantage of VBScript is that most browsers except Internet Explorer will not process VBScript code.
  • VBScript will not run on computers that run on operating systems other than Microsoft Windows including Linux, Mac etc.

Where Should I write the Program?

We should write VBScript code in Notepad. Now, VBScript is used as the default scripting language of ASP. Example:

Dim i
i = 10
MsgBox i

VBScript is not Case Sensitive.

How Did the Program Executed?

  • Double Clicking on the File or Windows Explorer
  • Command Prompt

Two Program Works for VBScript Program Execution:

  1. Wscript.exe (Windows Explorer)
  2. Cscript.exe (Command Prompt)

Comments

Comments is something will not be executed, it’ll be skipped. Use to write a comment. You can also use Rem keyword. For example,

  • ‘Created By: Noor Hossin, Nov-19-2014, 8:13 PM
  • Rem Instead of ‘ we can use Rem keyword

Using keyboard select the area and press ctrl+M. To remove Comments, select the comments and press ctrl+shift+M.

White Spaces

  • Any white spaces in VBScript will be ignored, except in string.
  • New line will not be ignored.

Unified Functional Testing Books

Table of Contents:

CH-1: Introduction to Automation
1.1 – What is Automation Testing?
1.2 – Why Automation?
1.3 – Test Automation Tools
1.4 – How to Choose an Automation Tool?
1.5 – Which Test Cases to Automate?

CH-2: Introduction to UFT
2.1 – Why QTP/UFT Tool?
2.2 – How to Install UFT?
2.3 – Applying Patches and Configuring Browsers
2.4 – QTP Tool Overview
2.5 – System Requirements for UFT
2.6 – Supported Technologies Add-Ins)
2.7 – UFT Introduction
➔ UFT GUI Testing
➔ UFT API Test ng
➔ Unified Functional esting
➔ UFT Integrated Testing
➔ Business Process Testing in UFT

3. Record & Playback
3.1 – First QTP Script Using Record and Playbac
❏ How QTP Did Record a Script?
❏ How QTP Did Play Back the Recorded Script?
3.2 – Different Types of Recording
❏ Normal Recording
❏ Analog Recording
❏ Low Level Recording
❏ Insight Recording
3.3 – How to Choose Recording Modes
3.4 – Running Tests

CH-4: Object Identification & Object Repositories
4.1 – How UFT Learns Objects
4.2 – Object Identification Mechanism
❏ Learned Description
❏ Visual Relation Identifier
❏ Smart Identification
❏ Ordinal Identifier
4.3 – Object Repositories- Local, Shared
4.4 – Synchronization
❏ WaitProperty
❏ Exist
❏ Wait
❏ Sync (only for web based apps)
❏ Inserting QTP Inbuilt Synchronization Points
4.4 – Object Spy Tool
4.5 – Virtual Objects
4.6 – Descriptive Programming (Static, Dynamic)
4.7 – Enhance Test Cases with Descriptive Programming
4.8 – Enhance Test Cases Using Dynamic Descriptive Program with User-Defined Functions

5. Checkpoints & Output Value
5.1 – Checkpoint Introduction
5.2 – Checkpoint Type
5.3 – Different Types of Checkpoints- Standard, Image, Bitmap, Table, Text, Textarea, Accessibility, Database, XML
5.4 – How to Insert a Checkpoint in a GUI Test or Component
5.5 – Output Values Introduction
5.6 – Configuring, Storing & Using Output Values

CH-6: Debugging Test Script
6.1 – Debugging Introduction
6.2 – Different Types of Debugging Techniques- Break Points, Step Into, Step Over, Step Out, Debug Viewer, Watch, Console

CH-7: Error Handling & Recovery Scenarios
7.1 – Error Handling
7.2 – Optional Step
7.3 – On Error Statement (programmatic handling of errors)
7.4 – Recovery Scenarios

CH-8: Working with Actions
8.1 – Introduction to Actions
8.2 – Different Types of Actions- Internal, External, Reusable
8.3 – Creating and Calling Actions
8.4 – Parameterization in UFT

CH-9: Working with Databases
9.1 – Introduction to Databases
9.2 – How to Connect to the Database from UFT?
9.3 – Creating Database Checkpoints
9.4 – Read/Write data from Excel sheet using UFT
9.5 – Data Table in QTP
9.6 – Working with External Databases
9.7 – File Handling Using UFT

CH-10: Advanced Object Identification
10.1 – When to use Advanced Object Identification
10.2 – Object Identification Using – XPath, CSS, Web Table, Child Objects, HTML DOM, WebFrame
10.3 – Regular Expressions
10.4 – SendKeys Method
10.5 – DeviceReplay Method
10.6 – FireEvent Method

CH-11: Frameworks
11.1 – Introduction to Frameworks
11.2 – Benefits of Using Frameworks
11.3 – Different Types of Framework
11.4 – Implementation of Each Framework on Real Applications
11.5 – Batch Runner
11.6 – Task Scheduler

CH-12: Additional Topics
12.1 – Automation Object Model
12.2 – Page Object Model
12.3 – Integration of QTP with ALM/QC
12.4 – Continuous Integration Using Jenkins
12.5 – Send Email Using MS Outlook
12.6 – Find the Row Where TestCase is Located
12.7 – Close all the Open Browsers
12.8 – Built In Method in UFT
12.9 – Get count and names of all open Browsers and Links.

Please let me know your feedback by using following comments form.