UiPath Documentation
studiox
2023.4
false
StudioX 用户指南
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

编辑目标

如果在项目执行期间未正确识别目标,则可以在指定目标后,通过在活动正文中选择 文档图像 > “编辑目标”来编辑目标及其锚点。这将打开选择模式,并突出显示目标及任何已识别的锚点。将鼠标悬停在目标或锚点上时,屏幕上将显示一个菜单。

  • 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.
  • 要编辑目标或锚点,请悬停在其上方,然后在悬停菜单中单击“设置”文档图像。您可以在“选择选项”窗口的“高级设置”部分编辑检测元素时所用方法的属性:
    • 选取器/模糊选取器

      • 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 文档图像 next to it.

        You can use variables in attribute values. The variables must be surrounded in double curly brackets, for example <wnd name='da{{var1}}'/> adds the value of var1 to the selector. The default value of the variable is used at design time. For information on how to create variables for selectors, see Creating Variables for Use in Selectors.

      • 对于模糊选取器,可以将相应的滑块从 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.

    • Click Apply to save the changes, and then click Validate if you want to validate the selection. To save the selection, click Confirm.

验证您的选择

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

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

文档图像 该方法是第一个成功识别元素的方法。

文档图像 此方法已成功识别元素。

文档图像 该方法无法识别元素,因为发现了太多重复项。

文档图像 此方法未能识别元素。

创建选取器中使用的变量

You can create variables from the Use Application/Browser activity and most other container activities. The scope of the variable is within the activity where it is created.

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

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

    • - 单击字段右侧的加号 文档图像,然后使用菜单中的一个选项来指明要在运行时使用的值。例如,您可以输入文本,从 Excel 文件中选择一个单元格,或选择一个先前保存以备后用的文本值。变量类型是字符串。

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 文档图像 menu of compatible activity fields inside the container.

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

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

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新