Tuesday, February 5, 2013

QTP- Some Basic Questions


Type of Objects available in QTP

There are 4 types of Objects available in QTP.

1) Run-time Objects- it present under Application under Test (AUT) is called run time object. State can be Enable, disable,focused
2) Test Objects-Reference of run time object is called Test object
3) Utility Objects
4) Automation / User Defined Objects- user defined objects used to work with files, drives, folder etc. example FileSystemObject, ExcelObject, Database connection object etc

Utility Objects

These are QTP reserved objects, used for Testing and Result reporting.
Example:

a) SystemUtil
b) Reporter
c) DataTable
d) Services
e) environment etc...

About Object, Property and value

Object: It is something which has structure and properties
Property: an attribute of an Object.
Value: Value of the Property

About Statement, Action and Test in QTP

Statement: an Instruction or a minimal executable unit
Action: Set of Statements
Test: One or more Actions

How Load repository files During run-time?

We can Load Object Repositories during run-time using an Utility object called "RepositoriesCollection"
Syntax:
RepositoriesCollection.Add "path of the Repository file"

Example:
RepositoriesCollection.Add "D:\ORsample.tsr"

No comments:

Post a Comment