Identify Object Dialog Box

You can use the Identify Object dialog box to identify the locator of an object in the application under test (AUT), including objects that are not visible, for example containers. Depending on whether you are using object map entries during testing or not, the locator is the name of the object map item or the XPath locator of the selected object. When using object map entries during testing, the name of an object map item is used as an alias of the XPath locator of an object. When you have identified the locator of an object with the Identify Object dialog box, you can use the locator in visual tests and VB .NET scripts. You can also use the Identify Object dialog box to validate that an XPath locator or an object map entry is valid and corresponds to the expected object.

You can start the Identify Object dialog box in several ways, including the following:
  • In the toolbar, click Identify Object.
    Note: If you have not specified a test application, the Select Application dialog box opens, allowing you to specify the application from which you want to identify the object.
  • In the menu, click Tools > Identify Object.
    Note: If you have not specified a test application, the Select Application dialog box opens, allowing you to specify the application from which you want to identify the object.
  • In the Start Screen, select the Get Started tab and click Identify Object.
    Note: The Select Application dialog box opens, allowing you to specify the application from which you want to identify the object.
  • In an existing visual test, select a test step that refers to an object that you want to change. Open the Properties pane, click into the Locator field and select Identify a Control > Identify Object Dialog.
The Identify Object dialog box includes the following controls:
Start Identify
Click Start Identify to start recording object information in the test application. Click Stop Identify to bring the application under test into the appropriate state before recording a locator.
Selection mode
The selection mode defines how you can select the object that you want to identify. In Click mode, click on the object that you want to identify. In Hot Key mode, move the mouse cursor over the object that you want to identify and use the keystroke combination specified in the Keystroke list box. Typically, you choose the Hot Key mode to capture objects that only appear when they are clicked by the user, for example menus or combo-boxes. With the Hot Key mode, you can select the object and then press the hot key keystroke combination to capture the locator without dismissing the object.
Selected Locator
Displays the captured locator. When you click Start Identify, the Selected Locator field displays the locator of the object in the AUT, over which the mouse cursor is currently located.
Note: If you are testing on a browser, the Selected Locator field displays the locator only when you actually capture it.
Test
Click this button to highlight the selected object in the application under test. You can use this button to verify that you have selected the correct object.
Hide Locator Details/Show Locator Details
Click this link to show or hide the Locator Details table.
Locator Details table
The Locator Details table lists the objects and their related class type, locator value, and attributes for the application that you are testing, which enables you to see the hierarchy of the application. You can use this table to refine your selection and the attributes that you want to assign to the object. For instance, sometimes the auto-generated locator is not the best locator to use in a given test. You can use the Locator Details table to find a more relevant property to use with the locator.
Show object maps
Check this check box to display object map item names in the Locator column. Object map item names associate a logical name (an alias) with a control or a window, rather than the control or window's locator. By default, object map item names are displayed. To use locators, uncheck this check box.
Show full locators
Check this check box to display the full locator name. To show only the attribute associated with the object, uncheck this check box.
Show properties
Check this check box to display any attributes and attribute values for the object selected in the Locator Details table. You can select attributes in this table to use in the locator identification. To hide the Properties subtree and display only locator details, uncheck this check box.
Paste
Click this button to copy the Selected Locator into the appropriate visual test, script, or object map.
After you capture an object with the Identify Object dialog box, you can:
  • Expand the Locator Details tree to view the application hierarchy using the context menu.
  • Retrieve locators for objects in the subtree using the context menu.
  • Show additional locator attributes by clicking the link in the subtree.
  • Select an object in the subtree to replace the existing object listed in the Selected Locator text box.
  • Copy the locator into an existing locator in the Properties pane for a visual test.
  • Copy the locator directly into a .NET script.

    In the script, you must specify the code to use with the locator. Only the locator is copied.

  • Copy the locator into an object map item for an object map.