Create object repositories (2024)

This exercise describes how to create object repositories, which are collections of test objects used to test your app's user interface.

Define UFT One Record and Run settings

Configure UFT One to learn objects in the MyFlight application as WPF test objects.

To configure UFT One to learn objects on the application:

  1. Start with the MyFlightApplication solution and MyFlight test opened in UFT One. For details, see Create your test structure.

  2. Set UFT One's Record and Run Settings to define how UFT One learns objects in the app.

    1. Select Record > Record and Run Settings.

    2. Select Record and run only on: Applications opened by UFT One and Applications specified below

    3. Click the Add Create object repositories (1) button and browse to the FlightsGUI.exe file at:<UFT_One_installdir>\samples\Flights Application\FlightsGUI.exe

      Leave the other options in the Application Details dialog box with their default values.

      Create object repositories (2)

  3. Click OK to return to the Record and Run Settings dialog box.

  4. Click OK again to return to the main UFT One window.

    Then, continue with Spy on objects in the MyFlight application.

Create object repositories (4) Back to top

Spy on objects in the MyFlight application

Spy on the available properties and operations for some objects in the MyFlight application.

To spy on the application's objects:

  1. Open the MyFlight sample app.

    If it's already open, close it and re-open it to enable UFT One to recognize it properly. For more details, see Explore the sample MyFlight application.

  2. In UFT One, click the Object Identification Center Create object repositories (5) button in the UFT toolbar.

  3. Turn on the Multi-object Spy switch Create object repositories (6) and click the Start spying button Create object repositories (7) to spy on multiple objects at a time.

    The OIC window is replaced by the OIC widget Create object repositories (8), the cursor is changed to a hand icon Create object repositories (9), and UFT One is hidden to display MyFlight app.

    Switching to a regular Windows cursor

    When switching back and forth between the OIC and any other app, press CTRL to change the cursor from the hand to a normal Windows cursor.

    Hold down the CTRL button for as long as you need the Windows cursor and release it to switch back to the OIC's hand icon.

  4. Place the hand on an object in the MyFlight app and watch the captured properties and values displayed in the tooltip.

    Create object repositories (11)

  5. Click in the MyFlight Username edit box and Password edit box, and then click the OK button on the Login page.

    The OICwidget shows the number of captured objects.

    When you are done, click the OICwidget to open the OICwindow again. The window displays the list of objects you spied.

    Create object repositories (12)

    Note: If you enable the Hover mode before spying, you can hover over an object and the OIC will automatically capture the object.

  6. In the OICwindow, hover over a spied object and click the Edit button to enter the Edit view. The Edit view shows the object's hierarchy and identification properties.

    Create object repositories (13)

  7. Click Close to close the OIC.

Create object repositories (14) Back to top

Add specific objects to the object repository

Add specific objects required for your test to the object repository, one by one.

To add objects to the object repository:

  1. In UFT One, select Resources >Object Repository Manager. The Object Repository Manager enables you to manage the object repositories associated with your test, and contain your test objects.

  2. In the Object Repository Manager window, select Object >Add Objects. Both UFT One and the Object Repository Manager are hidden.

  3. Click in the MyFlights app Username edit box, and then select the agentName object, and click OK.

    Create object repositories (15)

    The agentName object is added to the Object Repository along with its parent object, the OpenText MyFlight Sample window object.

  4. Repeat the previous two steps to add test objects for the Password edit box and the OK button.

    Create object repositories (16)

    Drill down to the agentName test object

    In the Test Objects tree, select the agentName object, and notice the object properties shown in the right pane of the object repository. These are descriptive, or identification properties that UFT One uses to identify the object during a run session.

  5. Save the object repository.

    • In the Saved Shared Object Repository dialog, browse to folder where your solution and test is saved, and create a new folder named TutorialObjectRepositories.

      By default, the solution and test folder is C:%HOMEPATH%\My Documents\UFT One.

    • In the File name field, enter the name as Login.

    Note: This step only saves the object repository. It is not yet associated with your test.

  6. Associate the Login object repository with the Login action in your test.

    This enables you to use objects in this repository with any step in the Login action.

    To associate the object repository with the action:

    1. In UFT One's Solution Explorer, browse to and right-click the Login node.
    2. Select Associate Repository with Action, and then browse to the Login.tsr file you created in the previous step. Click Yes in the message box that opens.

    The object repository is now associated with the Login action, and is displayed in the Solution Explorer as a child element of the action.

    Create object repositories (19)

  7. Save your test. Then, continue to add object repositories for other areas of the MyFlight app.

    For details, see Create object repositories and Navigate and learn.

Create object repositories (20) Back to top

Navigate and learn

Use UFT One's Navigate and Learn feature to create shared object repositories for each of the remaining pages in the MyFlight app. Navigate and Learn enables you to learn all objects in a page or section of an application at once.

To create the FlightFinder object repository:

  1. In the MyFlight app, log in to display the Book Flight page. Log in using the following credentials:

    • Username:john
    • Password: hp
  2. Create a new shared object repository. In UFT One's Object Repository Manager window, click New Create object repositories (21).

  3. Continuing in the Object Repository Manager, select Object > Navigate and Learn.

    Both UFT One and the Object Repository Manager windows are hidden, and the Navigate and Learn toolbar appears.

    Create object repositories (22)

  4. Click the Define Object Filter button Create object repositories (23), and then select Default object types.

    Create object repositories (24)

  5. Have UFT One learn all objects in the Book Flight page of the MyFlight app:

    1. In the MyFlight app, click the Book Flight's title bar to bring it into focus.
    2. In the Navigate and Learn toolbar, click Learn.

    Note: The MyFlight app flickers, and UFT One adds test objects to your new object repository.

    Do not interact with the MyFlight app as UFT One completes this process.

  6. Close the Navigate and Learn toolbar to return to UFT One and the Object Repository Manager windows.

  7. Save your object repository in the TutorialObjectRepositories directory you created earlier, and name it FlightFinder.

  8. Associate the new FlightFinder.tsr object repository with the FlightFinder action in your test flow.

    For more details, see how you did this above for the Login action.

Create additional object repositories

Repeat these steps to create additional object repositories for the remaining MyFlight app page. Save your test as you go, and name each object repository according to the associated action name.

Note: Before learning a page, ensure you've selected items or entered text to ensure that all buttons are enabled. This ensures that UFT One learns these button objects properly.

Action and repository summary

When you're done, your test will have object repositories for the following pages:

MyFlight page name Object repository name Associated action
Login Login Login
Book Flight FlightFinder FlightFinder
Select Flight SelectFlight SelectFlight
Flight Details FlightConfirmation FlightConfirmation

Create object repositories (25) Back to top

More about objects and object repositories

UFT One uses test objects to recognize objects in your apps while running your test.

Each of these test objects is based on UFT One's test object model, which is a large set of object types, or classes. Each test object class has:

  • A list of available description properties that UFT One can learn the object
  • A list of relevant operations that UFT One can perform on that object.

Each test object class is part of a larger test object hierarchy. For example, the agentName test object is a child object of the OpenText MyFlight Sample window object.

Run-time objects are the actual objects in your app. When you add an object to an object repository, UFT One learns the properties of the run-time object and translates them into UFT One test objects.

Object repository recommendations

We recommend:

Creating modular repositories

Create separate shared object repository for each section/page of your app.

This ensures that it's simple to find the correct object when making updates.

Using shared repositories

Store test objects in shared repositories to reuse them in multiple actions or tests.

Updates made to these test objects are used in all associated locations.

Removing irrelevant test objects

Include only the test objects needed for your testing purposes.

This keeps your repositories small and manageable.

Using logical names

Provide logical names for your test objects and repositories.

This ensures that others can easily select the correct objects when creating or modifying tests.

Create object repositories (30) Back to top

Create object repositories (31) Next steps:

  • Add steps from the Keyword View
Create object repositories (2024)
Top Articles
How Important is Delivery Speed in Freight Forwarding?
Wat Is Dividend Uitkeren? En Hoe Werkt Het? | Ligo.nl
Kmart near me - Perth, WA
Umbc Baseball Camp
Don Wallence Auto Sales Vehicles
BULLETIN OF ANIMAL HEALTH AND PRODUCTION IN AFRICA
Riegler &amp; Partner Holding GmbH auf LinkedIn: Wie schätzen Sie die Entwicklung der Wohnraumschaffung und Bauwirtschaft…
2013 Chevy Cruze Coolant Hose Diagram
Tiraj Bòlèt Florida Soir
Pollen Count Central Islip
Robot or human?
10 Best Places to Go and Things to Know for a Trip to the Hickory M...
Otterbrook Goldens
House Of Budz Michigan
Conscious Cloud Dispensary Photos
Dutch Bros San Angelo Tx
Committees Of Correspondence | Encyclopedia.com
Cocaine Bear Showtimes Near Regal Opry Mills
The Many Faces of the Craigslist Killer
Disputes over ESPN, Disney and DirecTV go to the heart of TV's existential problems
Bn9 Weather Radar
Regina Perrow
Booknet.com Contract Marriage 2
January 8 Jesus Calling
Chelsea Hardie Leaked
Keshi with Mac Ayres and Starfall (Rescheduled from 11/1/2024) (POSTPONED) Tickets Thu, Nov 1, 2029 8:00 pm at Pechanga Arena - San Diego in San Diego, CA
Current Students - Pace University Online
Guide to Cost-Benefit Analysis of Investment Projects Economic appraisal tool for Cohesion Policy 2014-2020
Warren County Skyward
Swgoh Boba Fett Counter
Grand Teton Pellet Stove Control Board
Melissa N. Comics
The Hoplite Revolution and the Rise of the Polis
Att U Verse Outage Map
Newsday Brains Only
Hattie Bartons Brownie Recipe
AI-Powered Free Online Flashcards for Studying | Kahoot!
Craigslist Pets Huntsville Alabama
Is Arnold Swansinger Married
Bernie Platt, former Cherry Hill mayor and funeral home magnate, has died at 90
Albertville Memorial Funeral Home Obituaries
How to play Yahoo Fantasy Football | Yahoo Help - SLN24152
Luvsquad-Links
The Conners Season 5 Wiki
Watch Chainsaw Man English Sub/Dub online Free on HiAnime.to
Unblocked Games - Gun Mayhem
American Bully Puppies for Sale | Lancaster Puppies
Benjamin Franklin - Printer, Junto, Experiments on Electricity
Egg Inc Wiki
Overstock Comenity Login
What Are Routing Numbers And How Do You Find Them? | MoneyTransfers.com
Latest Posts
Article information

Author: Pres. Lawanda Wiegand

Last Updated:

Views: 5591

Rating: 4 / 5 (71 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Pres. Lawanda Wiegand

Birthday: 1993-01-10

Address: Suite 391 6963 Ullrich Shore, Bellefort, WI 01350-7893

Phone: +6806610432415

Job: Dynamic Manufacturing Assistant

Hobby: amateur radio, Taekwondo, Wood carving, Parkour, Skateboarding, Running, Rafting

Introduction: My name is Pres. Lawanda Wiegand, I am a inquisitive, helpful, glamorous, cheerful, open, clever, innocent person who loves writing and wants to share my knowledge and understanding with you.