Creating a Control Automation Step Using the Identify Object Dialog

When working with a test application, you can create individual steps that perform test actions. Creating individual steps means you do not have to re-record the visual test. Simply create additional actions against the test application as needed.

You can also create additional actions against non-visible controls using the Identify Object dialog box.

  1. Open the visual test in which you want to identify a control.
  2. Open the test application that contains the control.
  3. Select the step that is preceding the insertion point. The step you select is where you want to perform an action against the control.
  4. Choose Insert > Control From > Identify Object Dialog.
  5. If you are testing a web application, the Select Browser dialog box opens. Select the browser on which you want to identify the control and click Start Identify. The Identify Object dialog box opens.
  6. Click Start Identify.
  7. Move the cursor to the application that you are testing. Controls appear highlighted as the cursor passes over them in the application. The related locator string or object map item shows in the Selected Locator text box.
  8. Click the control that you want to use as it is highlighted.
  9. Optional: Click Show Locator Details to display the locator tree and any related attributes in the Locator Attribute table.
  10. Optional: You can replace a recorded locator attribute with another locator attribute from the Locator Attribute table. For example, your recorded locator might look like the following:
    If you have a textContents Login listed in the Locator Attribute table, you can manually change the locator to the following:
    The new locator displays in the Selected Locator text box.
  11. Click Test to verify that the locator recognizes the correct control.
  12. To add a new step that uses the locator to the visual test, click Paste. The Select Action dialog box opens. Select the action that should be performed against the control and click OK.