INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Exporting/saving Object Repository

Exporting/saving Object Repository

(OP)
I am automating tests in HP thin clients and actually I'm facing kind of a trouble with the object repository.
When I export the script to a zip file the repository does not go with the zipped file.

My script has a "main" control action and "sub" controlled reusable actions, which one having their own repository.

I tried to merge reps. into one and it apparently did ok, but when I exported the file and imported to another pc, to avoid unlocated components error while starting QTP I copy-pasted the repository, but some of the objects from the repository weren't found anyway along the script runtime.

How do I include the rep. into the exported zip file, or how do I make the script to recognize objects at once instead of having to update the repository from target application every time before running the script?

RE: Exporting/saving Object Repository

This is what I did:

1. Go to where the script resides. Let's say on the C: drive.
2. Create a directory called Lib.
3. Open the script that has the original OR (Object Repository) that you want.
4. Within QTP click on the OR icon or (Ctrl+R).
5. Click File > Export Local Objects
6. Export the OR to that Lib directory you just created.
7. Name this new file, Library.tsr

Now when you move your scripts or make copies of the script, open the new script and associate it to that Library.tsr file.

1. Open the new QTP script.
2. Click Resources > Associate Respositories
3. Click the +
4. Locate the Library.tsr file
5. This will move it down into the Available Actions area.
6. Highlight it there and hit the > to move it over to Associated Actions.
7. Save

Note: Be careful if you are using a mapped drive name for a shared drive that your team will be using.

Example:

Let's say that the library.tsr file is on a shared drive and your computer sees that shared drive as Z: but your teammate has it mapped as T:.

Best thing to do is to find out the long name of this shared drive. EX: //Shared/drive

And rename the respository location in your script from:

Z:/BLAH-BLAH/QTP_Script/Lib

To:

//Shared/drive/BLAH-BLAH/QTP_Script/Lib

Hope that answers your question.

SBsteve

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close