Save Object Repository into XML format:
To reduce the size of Object Repository, save it in XML format. User can export and import same or different object repository into XML format, using this process. The Same object repository can be imported from XML and can be edited/deleted and exported back to XML. To do so, open Shared object Repository Window, go to File > Export to XMLor Import to XML as shown below,
Compare Object Repositories using Comparison Tool:
Object repositories can be compared using Object Repository Comparison Tool. This comparison is helpful for users to see two different object repositories objects, properties and their values, to decide which repository is helpful for test. To get this tool, goto Resources > Object Repository Manager.
Form Object Repository Manager window, access Tools > Object Repository Comparison Tool.
The Object Repository comparison Window opens, here user has to choose two Object Repository files for comparison and click on OK.
It shows the Comparison and displays the differences one by one as shown below.Close the “Comparison Statistics”.
Next, after closing “Comparison Statistics”, click on “Filter” button. Filter dialog box opens with three parameters- unique objects, identical objects, and partial match objects.Confirm that all three options should be selected.
Merging Object Repositories:
Some time, it becomes necessary to merge object repositories with each other. In this case, object repository adds additional overheads.In UFT, go to Resources > Object Repository Manager. In the opened Object Repository Manager window, go to Tools > Object Repository Comparison Tool.
The Object Repository Merge Window opens. Here, select two Object Repository files for merge and click OK.
Next, Merge Statistics shows with conflicts and merge summary, shown in the figure below. Close the Merge Statistics dialog box.
Display objects and their properties by using filter options; show all objects, or show only conflicting objects.Choose show only conflicting objects in this case.
Ordinal Identifiers:
In some situation, we get series of objects with same class name and properties. Suppose, UFT window has series of check boxes with the same set of properties and user wants to work on those objects, first they have to uniquely identify them then only UFT will be able to act on it.
Here, an Ordinal Identifier works; it gives a numerical value to test objects that specifies its location or order in a group. This value helps UFT to identify objects when the inbuilt properties are NOT sufficient to do so.UFT supports 3 Ordinal Identifiers,
- Index
- Location
- Creation Time
Index:
An object that comes first in the UserIdentity1, has smaller Index value and an object that comes last, has highest Index value.
Index value of Text boxes will be as follows,
Location:
The Location shows values vertically from top to bottom and from left to right. That’s why; in some situation, location value for the group of text boxes will look like as follows,
Creation Time:
When two browsers open same web based application, UFT does not identify the window as both windows have the same set of properties. In this case, the Creation Time becomes very much helps for UFT.
User Defined Objects:
In UFT, the application does not use Standard Windows Classes when objects identification confuses to users. UFT interface uses Class Name to discovery the type of Object and sometime these object can be shown as a button or Combo Box etc. When we add the button object displays as Winobject. To get this WinObject, go to Tools > Object Identification. When Object Identification dialog box opens, from Environment drop down box select “Standard Windows” then click on “User Defined” button.
Note: This option won’t work against any other environment.
In the below example, an object of a specific class is made to identify as an object of Type “button”. Hence this object inherits all properties of a button and we can use the objects that are supported by button.
Object Spy:
Object Spy is a utility/option used to add objects to the Object Repository. Object Spy can be retrieved from the tool bar, as shown in the figure below,
Once user clicks on the Object Spy icon, the Object Spy Dialog box opens. Here, click on pointing hand to add objects in the repository.
After Spying the object in the Object Spy dialog box, Object Spy displays the object hierarchy with the Object_Class and Object_Name, and also displays the properties and values of the object shown in the figure below.
Object Spy’s “Highlight” option highlight the particular object of which object Spy displays the information. To check this feature, click on “Highlight”, it will take you to that particular object of the application. The given below figure shows the highlighted part of the application, comes after clicking on “Highlight” option.
To add the object into the Object Repository, need to click on “Add objects” button in the Object spy dialog.
Properties and values display of particular object in the dialog box should be unique for UFT to identify the objects while the script executes.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.