Use variable anchor

You can use the variable anchor to automate same controls that have different anchors. For example, pages having multiple checkboxes with different captions. These captions might be dynamic and might change based on the workflow. You can use the variable anchor to capture the control once, and then use the anchor as a variable in the Bot editor window. You can use a variable from various sources, for example, Microsoft Excel, CSV, or database.

Capture using variable anchor

  1. On the left pane, click Automation.
  2. To create a bot, click Create new > Bot or open a bot for which you want to record a task.
  3. Click Start recording.

    The Recorder bot runtime window appears.

  4. Select a window from the drop-down list.

    If you opened an application recently and it is not available in the list, click the Refresh icon.

  5. Click AISense Recorder and allow the scanning process to finish.
    Note: The AISense Recorder downloads the required dependent files the first time you use it on a device.

    The AISense Recorder toolbar appears with these options: Finish, Scan, Define, and Pause.

    The AISense Recorder analyzes the selected application window to identify the UI objects in that window. When the system is analyzing the application window, the options on the toolbar are unavailable. After the analysis completes, the options are enabled and you can start recording the task.

  6. Wait for the AISense Recorder to detect the object.
  7. If the object is not detected automatically, then when the AISense Recorder reaches the Ready state, you can click the Define button to detect the object.
    Note:
    • In the Define window, the AISense Recorder shows embedded help for each control type so you can select the correct control types for custom objects.
    • If you unintentionally click the screen or click before the highlighter appears, AISense Recorder provides visibility into it. You must confirm to capture the object again, or use the Define functionality to define the object on the screen.
    .
  8. Select Variable anchor from the Select the object type for the selected area tab.

    Capture dynamic controls using variable anchor

  9. Draw a rectangle around the checkbox that you want to capture.

    The selected area is shown in the box below the Drag and select the area which you want to define from the image field.

    Note: Hover the mouse over the checkbox and ensure that the checkbox is detected and highlighted with red rectangle before you click Define.
  10. Hover the mouse over the closest static text. Once the text is highlighted, select the text as the supporting anchor.

    The image of the anchor is shown in the box below the Select one supporting anchor point for the selected area field.

  11. Click Define.
  12. After you have captured the required objects, click Finish.

    The recorded steps appear as a separate action in the bot.

    For each variable anchor action, you can copy the added action and update the value in the Anchor field with the anchor text of the object you want to capture, for each variable anchor action. Alternatively, you can use the action within the Loop action and use a variable that supports the String data type in the Anchor field.

    Edit object properties

Note:
  • You can assign only highlighted controls to a variable.
  • Ensure no additional control or text exists between the anchor and the control.