Pre-General Availability: 2024-09-02

Work with Targets

Create and update targets on the canvas.

To learn more about targets and other robot resources, see Alternatives to Hard Coding Data.

Create a Target

A target identifies the HTML element that a robot interacts with. Every target has two components: a user-friendly name, and the hard-coded XML path language, or XPath, for the element. You can create a target on the canvas, outside of a robot.

You typically create targets while you're adding an action to a robot. See Add an Action to a Robot. Creating a target this way is fast and easy, so you don't save much time by creating targets outside of a robot.

  1. Open a robot.
    1. In the navigation pane, select Projects.
    2. Select the project name.
    3. In the left toolbar, select Robot Robot.
    4. In the Robots box, select the robot to open.

      The canvas appears.

  2. In the toolbar, select Targets Targets.

    The Targets panel appears.

  3. Select Create Create.

    The Target panel appears.

  4. In another browser window, open the application that the robot needs to work in.
  5. Click within the Locator field, and select Target a page element Target a page element.
  6. In the application that the robot needs to work in, point to the UI element that a robot needs to interact with, but don't select the element yet.

    For example, do not select the UI element while the magnifying lens icon appears and the field is shaded purple. The recorder is still collecting information about the UI element.

    A checkbox control (the checkbox itself, not including its text label) is shaded purple, and a magnifying lens icon appears above it. A big red X appears, indicating that the control isn't ready to be selected

  7. After the icon changes to a target, the shading turns green, and the mouse icon changes to a hand, select the UI element.

    A checkbox control (the checkbox itself, not including its text label) is shaded green, and a target icon appears above it. A big green checkmark appears, indicating that the control is ready to be selected

    For more tips, see Quick Start for Building Robots.

    The recorder enters a value in the Locator field.

  8. Click OK.
  9. Above the canvas, select Save.

Update a Target

Sometimes, the fields and buttons that a robot interacts with change. A central list of all targets are right at your fingertips for stress-free maintenance. You don't even have to open the action that references a target.

  1. Open the robot whose target needs to change.
    1. In the navigation pane, select Projects.
    2. Select the project name.
    3. In the left toolbar, select Robot Robot.
    4. In the Robots box, select the robot to open.

      The canvas appears.

  2. In the horizontal toolbar on the right, select Targets Targets

    The Targets panel appears. The Usages value indicates the number of times the value is used in the robot.

  3. Optional: View where the target is used.
    1. In the list, locate the target to update.
    2. Select the Usages link to its right.
      The Target usages panel appears.
    3. Review the actions that use the value.
  4. Update the target.
    1. Above the list of targets, select Edit Edit icon.

      The Target panel appears.

    2. Optional: Update the fields as needed.
  5. Click OK.
  6. Above the canvas, select Save.