Using only a Shared Repository - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Using only a Shared Repository (/Thread-Using-only-a-Shared-Repository) |
Using only a Shared Repository - Osbornebckk - 07-24-2009 Good day all, I'm new to the forums and have a question I can't find the answer to. I hope someone can help. I've taken a couple of online classes, but other than that, I'm self taught in QTP. Here is my issue. Background info: I'm using a terminal emulator for Extra. The screen names and object names that QTP gets from the program when recording makes no sense and is almost alway TOO specific to actually be played back. I have built a shared repository manually with screen names and object names with properties specific enough to be found every time but general enough that they can be found with any iteration. I want to associate this shared repository with an action that I want to program. (I can do this part) The action I'm going to program is very long and complicated so I REALLY want to record it once and just tweek it to use the DataTable where needed. The Problem: When I record the action, QTP creates a new local repository rather than using my manually created shared repository. One solution: I can edit the QTP script manually changing the screen and object names to look at my shared repository and it works. But that is a lot of work for this automation that is going to end up being tens of thousands of lines long. My Question: How do I FORCE QTP to look at and record from ONLY my shared repository? Again, I'm mostly self taught, so if this is a rediculously easy solution, I appologize for my ignorance. Brian RE: Using only a Shared Repository - Saket - 07-27-2009 I think you will have run your test using AUT Open the test and load your required repository before running your scripts Code: Dim qtApp RE: Using only a Shared Repository - Osbornebckk - 07-27-2009 The issue isn't running the tests, it's recording them. Once the tests are recorded and the correct object repository is manually set by changing the screen and field names it runs fine. I do load the shared repository before I begin recording, but QTP still wants to create its own local repository rather than reading the object repository that I have specified. Here is an excerpt from my shared and local repositories. In the image you can see my shared repository in the upper right and the inserted image of the local repository after I record. The screen also shows what QTP is recording. I think that part of the problem is that QTP is looking somewhere other than where I tell it the screen label is at. I'm afraid I just don't know where QTP is getting that Screen40176 at, but it can capture 10 different numbers for one screen depending on what is displayed on the screen. I'm open to any ideas at all. RE: Using only a Shared Repository - Saket - 07-28-2009 If i understood it right, you want to record your test using a shared object repository. you want QTP to take the objects from your shared repository and not to create the new local repository. Try associating the shared repository with your test. hope this will solve your issue. Resources>Associate Repository RE: Using only a Shared Repository - stevelnk - 08-24-2009 Greetings! I have a similar issue, where, after opening a script and associating my shared.tsr with the test (only one Action per test), after running the script, QTP throws runtime error The object "BrowserXXX" object was not found in the Object Repository. Check the Object Repository to confirm that the object exists or to find the correct name for the object." (The object DOES exist in the AUT, and the object IS in the OR (both local and Shared.) Also, please note that another object on the same page and browser (whose names are static...do not change at all), IS found and recognized by QTP 9.2. Thanks for any expertise provided. RE: Using only a Shared Repository - stevelnk - 08-25-2009 Hi Saket. When I run your code with my QTP 9.2 script (using the path to my shared Repository, of course), I get a "General Run Error" on this line: Code: Set qtRepositories = qtApp.Test.Actions("Main").ObjectRepositories Thank you. RE: Using only a Shared Repository - Saket - 08-25-2009 I guess you have not replaced "Main" with your Action Name, right? if so try replacing the action name "Main" in the statement with your used action name. let me know if you still have any issue Code: Set qtRepositories = qtApp.Test.Actions("<<Action Name>>").ObjectRepositories |