Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
For More QTP Information & Scripts Visit:

For More QTP Information & Scripts Visit:

Ratings: (0)|Views: 45|Likes:
Published by api-23040079

More info:

Published by: api-23040079 on Feb 13, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





For more QTP Information & Scripts visit:www.gcreddy.com
Advanced QTP
(In VBScript Orientation)
1) Introduction
2) Comments

3) VB Script Variables
4) VB Script Data Types
5) VB Script Operators

6) Input/Output Operations
7) Constants
8) Conditional Statements
9) General Examples

10)Loop Through Code
12)Built-In Functions
13)VBScript syntax rules and guidelines
15)File System Operations
16)Test Requirements

17) Solutions
18)QTP Add-Ins Information
19) VBScript Glossary
For Complete Document Visit:
For Manual Testing documents visit:www. gcr eddy. net
For more QTP Information & Scripts visit:www.gcreddy.com
VBScript is a scripting language.
A scripting language is a lightweight programming language.
VBScript is a light version of Microsoft's programming language Visual Basic.

When a VBScript is inserted into a HTML document, the Internet browser will read
the HTML and interpret the VBScript. The VBScript can be executed immediately, or
at a later event.

Microsoft Visual Basic Scripting Edition 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.

1.1 Windows Script Host (WSH)
It is a Windows administration tool. WSH creates an environment for hosting scripts.

That is, when a script arrives at your computer, WSH plays the part of the host \u2014 it
makes objects and services available for the script and provides a set of guidelines
within which the script is executed. Among other things, Windows Script Host
manages security and invokes the appropriate script engine

Windows Script Host is built into Microsoft Windows 98, 2000, and Millennium
Editions and higher versions.

A Windows script is a text file. We can create a script with any text editor as long as
we save our script with a WSH-compatible script extension (.js, vbs, or .wsf).
The most commonly available text editor is already installed on our computer \u2014
Notepad. We can also use your favorite HTML editor, VbsEdit, Microsoft Visual C++,
or Visual InterDev.

1.2 Creating a script with Notepad

1.Start Notepad.
2.Write your script. For example purposes, type Msgbox "Hello VB Script"
3.Save this text file with a .vbs extension (instead of the default .txt extension). For

example, Hello.vbs
4.Navigate to the file you just saved, and double-click it.
5.Windows Script Host invokes the VB Script engine and runs your script. In the

example, a message box is displayed with the message "Hello VB Script"
1.3 Hosting Environments and Script Engines
For Manual Testing documents visit:www. gcr eddy. net
For more QTP Information & Scripts visit:www.gcreddy.com

Scripts are often embedded in Web pages, either in an HTML page (on the client
side) or in an ASP page (on the server side).
In the case of a script embedded in an HTML page, the engine component that
interprets and runs the script code is loaded by the Web browser, such as Internet

In the case of a script embedded in an ASP page, the engine that interprets and runs
the script code is built into Internet Information Services (IIS).
Windows Script Host executes scripts that exist outside an HTML or ASP page and
that stand on their own as text files.
1.4 Available Script Engines
Generally, we write scripts in either Microsoft JScript or VBScript, the two script
engines that ship with Microsoft Windows 98, 2000 and Millennium Editions.
We can use other script engines, such as Perl, REXX, and Python, with Windows
Script Host.

A stand-alone script written in JScript has the .js extension; a stand-alone script
written in VBScript has the .vbs extension. These extensions are registered with
Windows. When we run one of these types of files, Windows starts Windows Script
Host, which invokes the associated script engine to interpret and run the file.

For Manual Testing documents visit:www. gcr eddy. net

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->