SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jun 2004
    Location
    Mumbai
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to load Repository in QTP 9.2 using VB Script

    Hi,
    I'm using QTP 9.2.Previously i'm having my scripts on QTP 8.2.Now i want to shift my scripts to QTP 9.2.i'm launching my QTP using VB Script.At the same time,i want to load the Object Repository file after launching QTP.Previously i'm using the below statement
    qtTest.Settings.Resources.ObjectRepositoryPath = "C:\Automated Testing\Object Repository\OR.tsr".
    In QTP 9.2, OR setting is under Resources menu not under Test Settings.So, how do we load the Repository file using VB Script in QTP 9.2.

    Thanks in Advance.

    Thanks,
    Bhaskar Naidu

  2. #2
    Member
    Join Date
    Jun 2007
    Location
    Bavaria
    Posts
    33
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to load Repository in QTP 9.2 using VB Script

    You can use a script like this:

    Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
    ' Open a test and get the "Login" action's object repositories collection
    Set qtRepositories = qtApp.Test.Actions("Action1").ObjectRepositories ' Get the object repositories collection object of the "Login" action

    Const ORPath = "<OR-file with complete path>"
    If qtRepositories.Find(ORPath) = -1 Then ' If the repository cannot be found in the collection
    qtRepositories.Add ORPath, 1 ' Add the repository to the collection
    End If
    But there might be problems with updating object parameters using SetTOProperty
    dynamic OR and SetTOProperty

    regards
    Dirk

  3. #3
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: How to load Repository in QTP 9.2 using VB Scr

    QTP 9.2 provides a RepostoriesCollection object which can be used to add a object repository at run-time.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:40 PM.

Copyright BetaSoft Inc.