h2k infosys is business based in atlanta, georgia – united states providing online it training...

7
Infosys is business based in Atlanta, Georgia – United Sta Providing Online IT training services world wide. www.H2KINFOSYS.com USA - +1-(770)-777-1269, UK - (020) 3371 7615 USA - +1-(770)-777-1269, UK - (020) 3371 7615 [email protected] / [email protected] [email protected] / [email protected]

Upload: brian-mcdonald

Post on 26-Mar-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: H2K Infosys is business based in Atlanta, Georgia – United States Providing Online IT training services world wide.  USA - +1-(770)-777-1269,

H2K Infosys is business based in Atlanta, Georgia – United StatesProviding Online IT training services world wide.

www.H2KINFOSYS.com

USA - +1-(770)-777-1269, UK - (020) 3371 7615 USA - +1-(770)-777-1269, UK - (020) 3371 7615 [email protected] / [email protected]@H2KInfosys.com / [email protected]

Page 2: H2K Infosys is business based in Atlanta, Georgia – United States Providing Online IT training services world wide.  USA - +1-(770)-777-1269,

H2K INFOSYS PROVIDES WORLD CLASS SERVICES INH2K INFOSYS PROVIDES WORLD CLASS SERVICES IN

Page 3: H2K Infosys is business based in Atlanta, Georgia – United States Providing Online IT training services world wide.  USA - +1-(770)-777-1269,

• Introduction

• 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

• VB Script Variables

• A variable is a convenient placeholder that refers to a computer memory

location where we can store program information that may change during

the time our script is running.

• Declaring Variables

• We declare variables explicitly in our script using the Dim statement, the Public

statement, and the Private statement.

• For example: Dim Country

Job Oriented QTP/UFT Training

Page 4: H2K Infosys is business based in Atlanta, Georgia – United States Providing Online IT training services world wide.  USA - +1-(770)-777-1269,

• We declare multiple variables by separating each variable name with a comma. For

• Example: Dim x, Top, Bottom, Left, Right

• Naming Restrictions for Variables• Variable names follow the standard rules for naming anything in VBScript. A variable

name:

• Must begin with an alphabetic character.

• Cannot contain an embedded period.

• Must not exceed 255 characters.

• Must be unique in the scope in which it is declared.

• Scope of Variables• A variable’s scope is determined by where we declare it.

• When we declare a variable within a procedure, only code within that procedure can

access or change the value of that variable.

Job Oriented QTP/UFT Training

Page 5: H2K Infosys is business based in Atlanta, Georgia – United States Providing Online IT training services world wide.  USA - +1-(770)-777-1269,

• If we declare a variable outside a procedure, we make it recognizable to all the

procedures in our script. This is a script-level variable, and it has script-level scope.

• Life Time of Variables• The lifetime of a variable depends on how long it exists.

• The lifetime of a script-level variable extends from the time it is declared until the time the script is

finished running.

• At procedure level, a variable exists only as long as you are in the procedure.

• Assigning Values to Variables• Values are assigned to variables creating an expression as follows:

• The variable is on the left side of the expression and the value you want to assign to the

variable is on the right.

• For example: Country = “India”

Job Oriented QTP/UFT Training

Page 6: H2K Infosys is business based in Atlanta, Georgia – United States Providing Online IT training services world wide.  USA - +1-(770)-777-1269,

Thank you

Your feedback is highly important to improve our course material and teaching methodologies. Please email your suggestions.

USA +1-(770)-777-1269 UK (020) 3371 [email protected] [email protected]

H2K Infosys is e-Verified business based in Atlanta, Georgia – United States

H2K Infosys acknowledges the proprietary rights of the trademarks and product names of other companies mentioned in this document.

Page 7: H2K Infosys is business based in Atlanta, Georgia – United States Providing Online IT training services world wide.  USA - +1-(770)-777-1269,

DISCLAIMERDISCLAIMER

H2K Infosys, LLC (hereinafter “H2K”) acknowledges the proprietary rights of the trademarks and product names of other companies mentioned in any of the training material including but not limited to the handouts, written material, videos, power point presentations, etc. All such training materials are provided to H2K students for learning purposes only. H2K students shall not use such materials for their private gain nor can they sell any such materials to a third party. Some of the examples provided in any such training materials may not be owned by H2K and as such H2K does not claim any proprietary rights for the same. H2K does not guarantee nor is it responsible for such products and projects. H2K acknowledges that any such information or product that has been lawfully received from any third party source is free from restriction and without any breach or violation of law whatsoever.