Results 1 to 11 of 11

Thread: How to add objects?

  1. #1
    Expert Member
    Join Date
    Oct 2006
    Answers
    209

    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.


  2. #2
    Junior Member
    Join Date
    Dec 2006
    Answers
    20

    Re: How to add objects?

    we can add objects during runtime by using SetROPROPERTY


  3. #3
    Junior Member
    Join Date
    Apr 2007
    Answers
    23

    Re: How to add objects?

    if u want to add it run time then go for setroproperty


  4. #4
    Junior Member
    Join Date
    Feb 2007
    Answers
    17

    Re: How to add objects?

    please give the example for add objects to OR during runtime?


  5. #5
    Junior Member
    Join Date
    Apr 2007
    Answers
    23

    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 .


  6. #6
    Expert Member
    Join Date
    Apr 2007
    Answers
    147
    Can anybody plz send a sample code for this???

    Last edited by jainbrijesh; 07-06-2007 at 04:43 AM.

  7. #7
    Expert Member
    Join Date
    Sep 2007
    Answers
    110

    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.

  8. #8

    Re: How to add objects?

    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?


  9. #9
    Expert Member
    Join Date
    Sep 2007
    Answers
    110

    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.


  10. #10
    Junior Member
    Join Date
    Apr 2009
    Answers
    1

    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


  11. #11
    Expert Member
    Join Date
    Sep 2007
    Answers
    110

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact