Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

How to add objects?

This is a discussion on How to add objects? within the QTP forums, part of the Software Testing category; How can we add objects to object repository during run time? Note : This is the question asked by a visitor thirupathi. I am posting this in proper forum....

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 11-28-2006
Expert Member
 
Join Date: Oct 2006
Posts: 689
Thanks: 0
Thanked 53 Times in 44 Posts
JobHelper is on a distinguished road
How to add objects?

How can we add objects to object repository during run time?

Note : This is the question asked by a visitor thirupathi. I am posting this in proper forum.
Reply With Quote
The Following User Says Thank You to JobHelper For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 03-30-2007
Junior Member
 
Join Date: Dec 2006
Location: ap
Posts: 21
Thanks: 0
Thanked 7 Times in 5 Posts
prasad79 is on a distinguished road
Re: How to add objects?

we can add objects during runtime by using SetROPROPERTY
Reply With Quote
  #3 (permalink)  
Old 04-04-2007
Junior Member
 
Join Date: Apr 2007
Location: Bangalore
Posts: 23
Thanks: 0
Thanked 1 Time in 1 Post
vvijaysagar is on a distinguished road
Re: How to add objects?

if u want to add it run time then go for setroproperty
Reply With Quote
  #4 (permalink)  
Old 04-04-2007
Junior Member
 
Join Date: Feb 2007
Location: hyd
Posts: 18
Thanks: 0
Thanked 3 Times in 3 Posts
lata_115 is on a distinguished road
Re: How to add objects?

please give the example for add objects to OR during runtime?
Reply With Quote
  #5 (permalink)  
Old 04-05-2007
Junior Member
 
Join Date: Apr 2007
Location: Bangalore
Posts: 23
Thanks: 0
Thanked 1 Time in 1 Post
vvijaysagar is on a distinguished road
Re: How to add objects?

by writing the descriptive programing we can add the properties at run time.
if u want example i will send it to later .
Reply With Quote
  #6 (permalink)  
Old 04-19-2007
Expert Member
 
Join Date: Apr 2007
Location: Kolkata
Posts: 151
Thanks: 3
Thanked 11 Times in 10 Posts
debleena23 is on a distinguished road
Can anybody plz send a sample code for this???

Last edited by jainbrijesh; 07-06-2007 at 05:43 AM.
Reply With Quote
  #7 (permalink)  
Old 12-26-2007
Expert Member
 
Join Date: Sep 2007
Location: Hyderabad
Posts: 115
Thanks: 1
Thanked 19 Times in 15 Posts
rajaputra is on a distinguished road
Re: How to add objects?

Hi Debleena,

Yes we can add Objects at runtime to the OR. You would have to open the OR at runtime and in a updatable mode.

Check out this code for the same -

Set QtApp = CreateObject("QuickTest.Application")
Set QtTestResources = QtApp.Test.Settings.Resources
QtTestResources.Load{Path of the Repository to be Opened}, mode

mode would be readOnly or Updatable.

Once you have the OR loaded use,
Add method and pass Obejct as parameter.

Dear Prasad and vijaysagar,
Unfortunately we dont have SETROPROPERTY method in QTP.

Last edited by rajaputra; 12-26-2007 at 08:40 AM.
Reply With Quote
  #8 (permalink)  
Old 12-27-2007
Moderator
 
Join Date: Oct 2007
Location: Frankfort, KY
Posts: 283
Thanks: 3
Thanked 54 Times in 36 Posts
Anshoo_Arora is on a distinguished road
Re: How to add objects?

Quote:
rajaputra said...
QtTestResources.Load{Path of the Repository to be Opened}, mode

mode would be readOnly or Updatable.
Rajaputra, yes, but please explain why we need "mode" at the end of the code.

What does your code do exactly? It seems incomplete to me. Does it "load OR during run-time" or does it add objects to OR during run-time?
Reply With Quote
  #9 (permalink)  
Old 12-27-2007
Expert Member
 
Join Date: Sep 2007
Location: Hyderabad
Posts: 115
Thanks: 1
Thanked 19 Times in 15 Posts
rajaputra is on a distinguished road
Re: How to add objects?

Hi Anshoo,
It will load OR during runtime.
Here mode will be updatable. Becuase we want to add objects to the OR. So, OR should be in updatable mode. If it is in readonly mode we cannot add object / modify ObjectRepository.
Thats why we required mode.
Reply With Quote
The Following User Says Thank You to rajaputra For This Useful Post:
  #10 (permalink)  
Old 04-29-2009
Junior Member
 
Join Date: Apr 2009
Location: Hyderabad
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
babsun5783 is on a distinguished road
Re: How to add objects?

Hai Rajaputra,

I have a doubt regarding the code. I am using QTP 9.5. While using the code an error message is being displayed that Object doesn't support this property or method. As for my reference through QTP Help, I observed that we can load object repository to the objectrepositoryutil object. Can u please give me clrification on this. I need it immediaely.

Thanks,
Siva
Reply With Quote
  #11 (permalink)  
Old 04-30-2009
Expert Member
 
Join Date: Sep 2007
Location: Hyderabad
Posts: 115
Thanks: 1
Thanked 19 Times in 15 Posts
rajaputra is on a distinguished road
Re: How to add objects?

Hi Babsun,

you can use below method to add object repository to your test.
Repositoriescollection.Add "RepositoryPath"

Here, RepositoryPath is path of the object repository
__________________
__________________

Thanks & Regards!!
RAJAPUTRA
www.makeqtpeasy.blogspot.com
http://rajaputra.spaces.live.com/
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Mapping of domain objects to a relational database nancyphilips Database General 1 09-24-2006 05:36 AM


All times are GMT -4. The time now is 07:41 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved