Basically UFT is object based Test Tool, Based on the front
end objects only it performs Test Operations.
Object: It is something which has structure and properties.
Property: It is an attribute of the Object, which describes the object.
Method: It is an operation on the Object.
Note: For database testing no object reference is required,
uft has an integrated SQL engine, we can execute SQl commands directly in the
UFT Tool Editor.
Software Objects in Windows based Environment:
Window, dialog box, Button, Radio Button check box, Edit
box, List box, Drop-down box, Combo box etc….
Software Objects in Web based Environment:
Browser, Page, Link, Image, Button, Radio Button, Check box,
Edit box, List box, Drop-down box, Combo box, etc….
Types of Objects in UFT:
1. Run-time Objects
2. Test Objects
3. Utility Objects
4. Automation Objects
1. Run-time Objects:
Objects Present in the Application.
Ex: Buttons, Links, Edit boxes etc…
Objects Present in the Application.
Ex: Buttons, Links, Edit boxes etc…
Note: Irrespective of the environment (Ex: Java or .NET or
Web)end user calls Button is button, Checkbox is checkbox, Edit box is Edit box (If it is Java , .NET or
any environment).
States of Run time objects:
Enabled, Disabled, Visible, Hidden, And Focused.
2. Test Objects:
Reference of Run time objects are called test object.
Test object name varies from one environment to another
Example:
-----------------------------------------------------------------------------------
Object
Windows
Visual Basic Web
-----------------------------------------------------------------------------------
Button
WinButton VbButton WebButton
Edit box
WinEdit
VbEdit WebEdit
Browser NA NA Browser
Page NA NA Page
-----------------------------------------------------------------------------------
How to
Get Test Object Information
1. Using Object Spy
2. Using Object Identification
States
Of Test Objects
Constant Object: Whose Properties values are fixed
Dynamic Object: Whose Properties values change dynamically
throughout the execution.
Duplicate Objects: Two are more objects with same description.
3.Utility
Objects
They are UFT Reserved Objects used for Testing and Result Reporting.
Every Utility object is unique.
Example:
Systemutil Object is used to launch the Application.
Syntax:
Systemutil.Run “Path of the Application”, [Windows based application]
Systemutil.Run “Path of the Browser”,”url” [Web based Application]
4.Automation
Objects:
They are User defined Objects used to
work with Drives, Folders, Databases and Files.
a.File
System Object Model
It is used to work with Drives, Folders and Files (Flat files)
Class value: ("Scripting.FileSystemObject")
How to create File System Object?
Set Variable = CreateObject(“Scripting.FileSystemObject”)
b.Excel Application Object
It is used to work with Excel Application/Excel files
Class value: ("Excel.Application")
c.Word Application Object
It is used to work with Word Application / Word documents
Class Value: ("Word.Application")
d.Database Objects
1.Database Connection Object
It is used to connect to Databases
Class value: ("Adodb.Connection")
2.Database Recordset object
It is used to perform operations on Database Tables
Class value: ("Adodb.Recordset")
e.Dictionary Object
It is used to define Key, Value pairs
Class value: ("Scripting.Dictionary")
f.QTP Application Object
It is used to automate UFT Tool operations and it is Local object model
Class Value: ("QuickTest.Application")
It is used to work with Drives, Folders and Files (Flat files)
Class value: ("Scripting.FileSystemObject")
How to create File System Object?
Set Variable = CreateObject(“Scripting.FileSystemObject”)
b.Excel Application Object
It is used to work with Excel Application/Excel files
Class value: ("Excel.Application")
c.Word Application Object
It is used to work with Word Application / Word documents
Class Value: ("Word.Application")
d.Database Objects
1.Database Connection Object
It is used to connect to Databases
Class value: ("Adodb.Connection")
2.Database Recordset object
It is used to perform operations on Database Tables
Class value: ("Adodb.Recordset")
e.Dictionary Object
It is used to define Key, Value pairs
Class value: ("Scripting.Dictionary")
f.QTP Application Object
It is used to automate UFT Tool operations and it is Local object model
Class Value: ("QuickTest.Application")
No comments:
Post a Comment
Note: only a member of this blog may post a comment.