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:
To find an object, property, or property value in the object repository:
- Make sure that the relevant object repository is open (in the Object Repository window or Object Repository Manager).
- Click the Find & Replace button or select Edit > Find & Replace. The Find & Replace dialog box opens.
- 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.
- 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.
- 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.
- Specify the search parameters, as follows:
- 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.
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.
إرسال تعليق