activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

用户界面自动化活动

上次更新日期 2025年11月12日

设置文本

UiPath.UIAutomationNext.Activities.NSetText

描述

在指定用户界面元素中输入文本,比如文本框。

该活动可在“使用应用程序/浏览器”活动内部和外部使用。

此活动可与对象存储库兼容。

项目兼容性

Windows - 旧版 | 窗口

Windows - 旧版 Windows 配置

  • 选择“在应用程序/浏览器中指明” ,以指定用作目标的用户界面元素。

    指定目标后,选择“ 菜单 按钮以访问以下选项:

    • “在屏幕上指定目标”- 再次指定目标。
    • 编辑目标 - 打开选择模式以配置目标。
    • 删除信息屏幕截图 - 删除目标应用程序或网页的屏幕截图。
    • 添加到对象存储库 - 将当前用户界面元素添加到库项目中,以便在整个自动化流程中重复使用该元素。
  • 文本 ” - 要写入目标元素文本属性的字符串。

属性面板

输入/输出

  • Input element - The UI element on which the activity is executed, stored in an UIElement object. This field supports only UIElement objects. This object can be obtained from the Output Element property field of other UI Automation activities.
  • Output element - Outputs a target UI Element and stores it in a UIElement object, which can be further used to target the same element with other activities.

选项

  • Healing Agent 模式- 根据流程或作业级别的监管或 Orchestrator 设置,配置此活动的 Healing Agent 行为。
    • 已禁用- 关闭此活动的 Healing Agent。
    • 继承作业设置- 在流程或作业级别应用在监管或 Orchestrator 中定义的设置。
    • “仅建议” - 允许 Healing Agent 提供有关如何修复正在运行的作业中的用户界面自动化问题的建议,但前提是监管或 Orchestrator 设置允许。
    • 与应用程序/浏览器相同- 从父级“使用应用程序/浏览器”活动继承配置。
  • “出错时继续” - 指定在活动引发错误时是否应继续自动化操作。 此字段仅支持 Boolean 值(TrueFalse)。 默认值为 False。 因此,如果该字段为空且活动引发错误,系统将停止执行项目。 如果该值设置为 True,则无论出现何种错误,系统都将继续执行项目。
  • 缓存目标元素 ”- 找到目标元素时对其进行缓存,并在下次活动运行时重用该元素,以提高执行性能。 此字段仅支持 Boolean (TrueFalse) 值。 默认值为 False。 在“ 触发器作用域 ”活动或触发的工作流中使用时,建议将该值设置为 “True”
  • Alter disabled element - If selected, the activity executes the action even if the specified UI element is disabled. This field only supports Boolean values (True, False). The default value is False.

目标

  • Expand target properties - Display target and anchor properties. This will hide the other activity properties and display only those related to the target.
  • Collapse target properties - Hide target and anchor properties. This will hide target related properties and display the activity properties.
  • 定位方法 - 要用于标识元素的选取器类型。 可以将此属性设置为下拉菜单中的任意组合:
    • Strict selector - The strict selector generated for the target UI element.
    • Fuzzy selector - The fuzzy selector parameters.
    • Computer Vision - 要将 Computer Vision 用作定位方法,您需要转到“项目设置”>“Computer Vision”,并确保设置正确的服务器端点。您可以原样保留此字段,并使用 UiPath Cloud(默认情况下已填写),也可以通过选择特定于服务器区域的任何其他公共端点或您自己的本地部署服务器来输入其他值。

      Another way of using Computer Vision as a targeting method is to set Use Local Server to True. This implies that the UiPath.ComputerVision.LocalServer package is installed in your project. When Local Server is enabled, the server value is over-written. However, the Local Server is not available in cross-platform projects.

      • CV 控件类型 - 指示使用 Computer Vision 识别的控件类型。
      • 计算机视觉文本 - 表示使用 Computer Vision 识别的文本。
      • CV Text occurrence - Indicates a specific occurrence to be used, when multiple matches are found.
      • CV Text accuracy - Indicates the accuracy level for OCR text matching.
    • Semantic selector - Leverages large language models (LLMs) to generate functional, human-like descriptions of UI elements. These descriptions are highly reliable making them adaptable to UI changes and significantly improving automation resilience when traditional selectors fail.
    • Image (Windows only)
      • Image accuracy - Indicates the accuracy level for image matching.
      • Image occurrence - Indicates a specific occurrence to be used, when multiple matches are found.
    • Native text (Windows only)
      • Native text - The text to find to identify the UI element.
      • Native text occurrence - Indicates a specific occurrence to be used, when multiple matches are found.
  • Window selector (Application instance) - Selector for the application window. Only applicable when window attach mode is set to application instance.
  • Wait for page load - Before performing the action, wait for the application to becaome ready to accept input. The options are:
    • - 不等待目标变为就绪状态。
    • “交互式”– 等待直到加载了应用程序的一部分。
    • “完整”– 等待整个应用程序被加载。
  • Visibility check - When enabled, the activity also checks whether the UI element is visible or not. You can choose one of three options from the drop-down menu:
    • ”- 不检查可见性。
    • 交互式(用于模糊选取器) - 默认选项。 检查元素是否可能可见,忽略页面滚动和其他应用程序的阻碍或应用程序已最小化。 当尝试确保您没有以 DOM 中存在但隐藏的不可见元素为目标时,此检查非常有用。
    • 完全可见 - 检查用户界面元素是否可见。
  • 响应式网站 - 启用响应式网站布局。

计时

  • “在此之前延迟”- 上一个活动完成与此活动开始执行任何操作之间的延迟(以秒为单位)。默认值为 0.2 秒。在活动之间添加延迟可确保一个活动有足够的时间完成,然后再开始下一个活动。

  • 延迟 时间” - 此活动完成与下一个活动开始执行任何操作之间的延迟时间(以秒为单位)。 默认值为 0.3 秒。 在活动之间添加延迟可确保一个活动有足够的时间完成,然后再开始下一个活动。

  • 超时”- 指定最长等待时间(以秒为单位),如果超出该时间后活动并未执行,系统便会抛出错误。 默认值为 30 秒。

  • 描述
  • 项目兼容性
  • Windows - 旧版 Windows 配置

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2025 UiPath。保留所有权利。