UiPath Documentation
studiox
2023.10
false

StudioX 用户指南

上次更新日期 2026年4月30日

编辑目标

If the target is not identified correctly during project execution, you can edit the target and its anchors after you have indicated it by selecting docs image > Edit Target in the body of the activity. This opens the selection mode with the target and any identified anchors highlighted. A menu is displayed when you hover the mouse over a target or anchor.

  • To remove a target or an anchor, hover it, and then click Delete 文档图像 in the hover menu. If you remove a target, the first element you click is added as the new target.

  • To add an anchor for a target, click the element to add as an anchor. Depending on the settings of your project, you may need to click Add Anchor 文档图像 in the hover menu of the target first. You can add up to three anchors for each target.

  • To edit a target or an anchor, hover it, and then click Settings docs image in the hover menu. The properties of the methods used for detecting the element can be edited from the Advanced Settings section of the Selection Options window:

    • Selector / Fuzzy Selector - Edit the selector using the corresponding text box. To copy the selector for pasting in another element or for editing in the UI Explorer, click Copy docs image next to it.
  • 您可以在属性值中使用变量。变量必须用大括号括起来,例如<wnd name='da{{var1}}'/>会将var1的值添加到选取器。变量的默认值在设计时使用。有关如何为选取器创建变量的信息,请参阅“创建在选取器中使用的变量”

    • 对于模糊选取器,您可以通过将相应的滑块从 0.4 拖动到 1 来更改“选取器精度”级别。该度量表示您正在搜索的属性与要查找的属性之间的相似度。要查找具有更高相似度的结果,请增加值。默认值为 0.7。您可以参阅 Studio 指南,详细了解选取器的相关信息。
    • 图像- 将相应的滑块从 0.4 拖动到 1,以更改“图像精度级别”。此度量表示您正在搜索的图像与要查找的图像之间的相似度。如果要查找的图像可能与您正在搜索的图像略有不同,您可以降低准确度。默认值为 0.8。

    • 通过清除/选中方法名称旁边的复选框来禁用/启用方法。

    • Verify how unique a method is by clicking Show all matches 文档图像 next to it. This checks all the elements in the window and highlights all that have similarities with the currently selected element in yellow.

    • 单击“应用” 以保存更改,然后如果您要 验证选择, 请单击“验证” 。要保存选择,请单击“确认”

验证您的选择

通过验证,您可以使用所有选定的方法和锚点检查目标,从而检查当前选择在识别目标方面的效果如何。验证结果将显示在“选择选项”窗口的顶部。如果需要调整,屏幕上会显示一条消息,其中包含有关如何改进选择的信息。

每种方法的性能显示在“选择选项”窗口的“高级设置”部分,使用以下图标之一:

docs image 该方法是第一个成功识别元素的方法。

docs image 此方法已成功识别元素。

docs image 该方法无法识别元素,因为发现了太多重复项。

docs image 此方法未能识别元素。

创建选取器中使用的变量

您可以在“使用应用程序/浏览器”活动 和大多数其他容器活动中创建变量。变量的范围在创建变量的活动之内。

要创建选取器中使用的变量,请执行以下操作:

  1. In the title bar of a container activity, select Settings 文档图像 > Value Mappings.
  2. 在“值映射”窗口中,单击“添加”,然后提供以下信息:
    • 名称 - 输入变量的名称。名称应遵循命名约定。

    • Value - Click Plus docs image on the right side of the field, and then use one of the options in the menu to indicate the value to use at runtime. For example, you can enter text, select a cell from an Excel file, or select a previously saved for later text value. The variable type is string.

After a variable is created, you can add it to selectors in activities added inside the container where it was created. For more information, see Editing a Target. The variable can also be selected from the Plus docs image menu of compatible activity fields inside the container.

有关如何在选取器中使用变量的示例,请观看以下视频。

  • 验证您的选择
  • 创建选取器中使用的变量

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新