Finding Objects in an Object Repository In QTP

How to Find Objects in an Object Repository I n QTP


You can use the Find and Replace dialog box to find an object, property, or property value in an object repository. You can also find and replace specified property values.

You replace property values for objects in the local object repository using the Object Repository window. You replace property values for objects in shared object repositories using the Object Repository Manager.

Notes:


  • The Find and Replace dialog box can only find checkpoint and output values by searching for the object name.
  • You cannot use the Find and Replace dialog box to replace property or object names. You cannot replace property values in a read-only component.

  • To find an object, property, or property value in the object repository:

    1. Make sure that the relevant object repository is open (in the Object Repository window or Object Repository Manager).

    2. Click the Find & Replace button  or select Edit > Find & Replace. The Find & Replace dialog box opens.


    3. Specify one or more criteria by which you want to search for the object, property, or property value:

      • Object name. Enter the name or partial name of the object you want to find.

      • Object type. Select the type of object you want to find, for example, Button.
      • Note: The object types in this list are a generic grouping of objects according to the general object characteristics. For example, the List type contains list and list view objects, as well as combo boxes; the Table type contains both tables and grids.

      • Object class. Select the class of object you want to find, for example, WebButton. The classes available depend on the selection you made in the Object type box.

      • Property name. Specify the name or partial name of the property you want to find.

      • Property value. Specify the property value or partial property value you want to find.

    4. If you specified a property value and want to replace it with a different value, enter the new property value in the New property value box.

    5. Specify the search parameters, as follows:

      • If you want the search to distinguish between upper and lower case letters, select Match case.

      • If you want the search to find only complete words that exactly match the single word you entered, select Match whole word.

      • Specify the direction in which you want to search: Up or Down.

    6. Perform the find or replace operation in one of the following ways. The search is performed on the entire object repository, starting with the currently selected object and in the direction you specified. To find the next instance, click Find Next again.

      • To find the specified object, property, or property value, click Find Next. The first instance of the searched word is displayed.

      • To individually find and replace each instance of the property value for which you are searching, click Find Next. When an instance is found, click Replace. The property value is replaced, and the next instance of the property value, if any, is highlighted.

      • To replace all instances of the specified property value with the new property value, click Replace All. Instances in shared object repositories that are not editable are not changed.

        The below stuff is very important and very frequently used by any QTP programmer in Object identification using QTP.

    Post a Comment

    أحدث أقدم