Adding Test Objects to a Local or Shared Object Repository

Adding Test Objects to a Local or Shared Object Repository

To add test objects to the object repository using the Add objects to local or Add Objects option.

  1. Perform one of the following.

    qtp_object_repository.jpg

    In the object Repository window, Select Object>Add objects to Local or click the Add objects to Local Toolbar button. If you select this option, the test object is added to the local object repository and can only be used by the current action.

    In the Object Repository Manager, select Object>Add objects or click the Add objects Toolbar button. If you select this option, the test object is added to a shared object repository and can be used in multiple actions.

    Quick Test and the Object Repository window or Object Repository Manager are hidden and the pointer changes into a pointing hand.

  2. Click the object you want to add to your object repository.

    If the location you click is associated with more than one object, the Object Selection dialog box opens. Select the object you want to add to the repository and click OK
    .

    If the object you select in the Object Selection dialog box is a bottom-level object in the test object hirerachy, for example, a web button object, then it is added directly to the object repository.

    If the object you select in the Object Selection dialog box is a parent object, such as a browser or page in a Web environment, or a dialog box in a standard Windows application, then the Define Object Filter dialog box opens. The define object filter dialog box retains the settings that you defined in the previous add object session.

    You can choose from the following options:

    ObjectFilter.JPG

    Selected object only:
    This option Adds the object repository previously entered object's properties and values to the QTP without selecting its descendant objects.

    Default object types:
    In default object types the object repository adds the previously selected object's properties and values with the properties of its descendant objects in which the object types are specified by the default filter. We can view the objects by clicking the Select button
    which are in the default filter and then after that also by clicking the Default button.

    All object types:
    It stores or adds the object repository the previously entered and selected object's properties and values with the same properties and values of all its specfied descendant objects.

    Selected object types:
    Selected object types can added to the OR of QTP the previously entered object properties and values and as well as the properties and values of its entered descendant objects according to the their object types and classes which are specified in object filter. The objects can be specify the objects and classes in the filter by selecting the Select button and selecting the required items in the "Select Object types dialog box".

  3. Select the required option and click OK to close the Define Object Filter dialog box and add the specified objects to the object repository according to the selected object filter.

    QTP_General2.jpg

  4. The Object Repository window is redisplayed, showing the new local objects and their properties and values in the object repository. If you choose to add the objects from the Object Repository Manager, the objects are added to the active shared object repository.

    1 image.jpg

  5. Quick Test also adds the new object's parent object if they do not already exist in the object repository. Local objects are shown in black in the object repository tree to indicate they are editable, shared objects are shown in gray and can only be edited in the Object Repository Manager.




Similar Articles