2. Agenda - Intermediate
• Output Values
• Understanding the script
• VBScript basics.
• Some FUM's (Frequently Used Methods)
• Object Identification Mechanism (Object Spy)
• Descriptive programming.
3. Output Values
• Output values are used for checking the
properties of the object. And these properties
are stored in the specified column during run
session in the DataTable
4. VB Script basics
• Declaring Variables
– Using Dim, Public, Private
• Naming Restrictions
– 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.
– Make sure you never create variables that have the same
name as keywords
• Assigning Values to Variables
• Creating Constants
• Conditions & Looping
6. Object Spy
• An inbuilt tool that enlists all of the test-object and runtime-
object properties.
• Can view the properties of any Object in the open application.
P
R
O
P
E
R V
T A
I L
E U
S E
S
7. DP
DP? What ?? Descriptive Programming.
But What?? Cool way to work w/o QTP object repository
And Why? Many Reasons
How? There are two ways
1. Throw the properties and values straight into a command
ObjectClassName("property:=value", "property:=value")
Ofcourse we're not limited to only 2 properties. We can write more:
ObjectClassName("property:=value", "property:=value", "property:=value")
8. DP
2. Throw the properties & values into a description object, and throw IT into the
command
We are using the variable oDesc to store the return from Description.Create.
Since, oDesc is preceded by a Set statement, that makes it an object
reference. Therefore, when the above statement executes, oDesc will become
an object reference to a description object.
colObject is nothing but an array of all objects having the exact same properties
as the description object.