Saturday, 19 November 2011


Dynamic handling of object Repositories

Loading repositories during running, finding path of the repositories and removingrepositories is called Dynamic Handling of Object Repositories.

Using this feature we can increase QTP performance. To do this, QTP is providing an object called “RepositoriesCollection”.

Syntax for Loading a Repository:
RepositoriesCollection.Add “Path of the Repository File”

Syntax for finding Position of the Repository:
Variable=RepositoriesCollection.Find(“Path of the Repository”)

Syntax for Removing the Repository:
RepositoriesCollection.Remove(position)

Syntax for Removing All Repositories:
RepositoriesCollection.RemoveAll

Example:
RepPath="C:\Documents and Settings\Administrator\My Documents\Login.tsr"
RepositoriesCollection.Add (RepPath)
systemutil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set "sudhakar"
Dialog("Login").WinEdit("Password:").Set "mercury"
Dialog("Login").WinButton("OK").Click
pos=RepositoriesCollection.Find(RepPath)
RepositoriesCollection.Remove(pos)
RepositoriesCollection.RemoveAll
***********************************

0 comments:

Post a Comment

TrainingHUB. Powered by Blogger.

Total Pageviews

THE BEST QTP TRAINING INSTITUTE IN HYDERABAD

QTP Training in hyderabad

Sql Tutorial

Popular Posts

Our Facebook Page

TrainingHUB

Followers