- 概述
- 用户界面自动化
- 关于“用户界面自动化”活动包
- 通过用户界面自动化实现自动化的应用程序和技术
- 项目兼容性
- UI-ANA-016 - 拉取打开浏览器 URL
- UI-ANA-017 - 出错时继续 True
- UI-ANA-018 - 列出 OCR/图像活动
- UI-DBP-006 - 容器使用情况
- UI-DBP-013 - Excel 自动化误用
- UI-DBP-030 - 选取器中的禁止变量使用情况
- UI-DBP-031 - 活动验证
- UI-PRR-001 - 模拟单击
- UI-PRR-002 - 模拟键入
- UI-PRR-003 - 打开应用程序误用
- UI-PRR-004 - 硬编码延迟
- UI-REL-001 - 选取器中的大 IDX
- UI-SEC-004 - 选取器电子邮件数据
- UI-SEC-010 - 应用程序/Url 限制
- UI-USG-011 - 不允许的属性
- UX-SEC-010 - 应用程序/Url 限制
- UX-DBP-029 - 使用不安全的密码
- UI-PST-001 - 项目设置中的审核日志级别
- UiPath 浏览器迁移工具
- 剪切区域
- 计算机视觉录制器
- Remote UI Automation design (Live authoring)
- 活动索引
- 激活
- 锚点基准
- 附加浏览器
- 附加窗口
- 阻止用户输入
- 标注
- 选中
- 单击
- 单击图像
- 单击图像触发器
- 单击 OCR 文本
- 单击文本
- 单击触发器
- 关闭应用程序
- 关闭选项卡
- 关闭窗口
- 上下文感知锚点
- 复制选定文本
- 元素属性更改触发器
- 存在元素
- 元素作用域
- 元素状态更改触发器
- 导出用户界面树
- 提取结构化数据
- 查找子元素
- 查找元素
- 查找图像
- 查找图像匹配项
- 查找 OCR 文本位置
- 查找相对元素
- 查找文本位置
- 获取活动窗口
- 获取上级
- 获取属性
- 获取事件信息
- 从剪贴板获取
- 获取全文
- 获取 OCR 文本
- 获取密码
- 获取位置
- 获取源元素
- 获取文本
- 获取可见文本
- 返回
- 前往
- 转至主页
- Google Cloud Vision OCR
- 隐藏窗口
- 高亮显示
- 热键触发器
- 悬停
- 悬停在图像上方
- 悬停在 OCR 文本上方
- 悬停文本
- 存在图像
- 在屏幕上指定
- 注入 .NET 代码
- 插入 Js 脚本
- 调用 ActiveX 方法
- 按键触发器
- 加载图像
- 最大化窗口
- Microsoft Azure 计算机视觉 OCR
- Microsoft OCR
- Microsoft Project Oxford Online OCR
- 最小化窗口
- 监控事件
- 鼠标触发器
- 移动窗口
- 导航至
- 存在 OCR 文本
- 在元素出现时
- 在元素消失时
- 在图像出现时
- 在图像消失时
- 打开应用程序
- 打开浏览器
- 刷新浏览器
- 重播用户事件
- 还原窗口
- 保存图像
- 选择项目
- 选择多个项目
- 发送热键
- 设置剪切区域
- 设置焦点
- 设置文本
- 设置为剪贴板
- 设置网页属性
- 显示窗口
- 启动进程
- 系统触发器
- 截取屏幕截图
- Tesseract OCR
- 存在文本
- 工具提示
- 键入
- 输入安全文本
- 使用前台
- 等待属性
- 等待元素消失
- 等待图像消失
- Computer Vision Local Server
- 移动自动化
- 终端
键入
在指定用户界面元素(例如文本框)中输入文本的活动。
UiPath.UIAutomationNext.Activities.NTypeInto
描述
在指定用户界面元素中输入文本,比如文本框。
您还可以向用户界面元素发送特殊键(例如 Tab 或 Enter)。
还支持粘滞键。例如,如果要键入 Shift+End 以仅选择控件的部分文本,则需要从特殊键列表中选择 Shift 和 End,建议的文本为 [k(Shift)][k(End)]。这将模拟按顺序按下 Shift 和 End 键。正确的文本为 [d(Shift)][k(End)][u(Shift)],其中 d 表示按键按下,k 表示按住按键,u 表示按键松开。
If you want to enter sensitive information securely, add a Get Username and Password activity before this activity and select the saved for later username and password values from that activity as the text to type.
此活动必须添加到“使用应用程序/浏览器”活动中。
如要在“使用应用程序/浏览器”活动之外使用该活动,您需要提供一个“输入”元素。
此活动可与对象存储库兼容。
要了解如何使用此活动,请参阅:
安全输入登录信息的先决条件
要使用此活动安全地输入用户名/密码信息,必须满足以下先决条件:
- A Get Username and Password activity must be added to the project.
- In the Get Username and Password activity, credentials previously saved to the Windows Credential Manager must be selected. If the credentials you want to use are not already saved in the Windows Credential Manager, you can use this activity to add them.
- 必须保存凭据,以供以后在项目中使用。
项目兼容性
Windows - 旧版 | Windows | 跨平台
Windows 和跨平台配置
- 在作用域内工作- 当活动放置在嵌套的“使用应用程序/浏览器”活动中时,选择托管要自动化的应用程序的浏览器选项卡或应用程序窗口。
- Indicate on screen - Indicate the UI element to use as target. After you indicate the target, select the hamburger menu next to the informative screenshot to access the following options:
- “指定目标” - 再次指定目标。如果您只想为当前活动指定描述符,则如果在对象存储库中定义了描述符,则必须先取消其与对象存储库的链接。
- “编辑目标” - 打开选择模式以配置目标。
- 删除信息性屏幕截图 - 删除目标应用程序或网页的屏幕截图。
- 更改信息性屏幕截图 - 更改目标应用程序或网页的屏幕截图。
- 添加到对象存储库- 将当前用户界面元素添加到“对象存储库”,以便可以在整个自动化流程中重用该元素。仅当对象尚未添加到“对象存储库” 时,才显示此选项。
- 在对象存储库中显示- 打开“对象存储库” 面板,并选中“描述符”。仅当将对象添加到“对象存储库”时,才会显示此选项。
- 取消与对象存储库的链接- 取消描述符与对象存储库的链接。仅当将对象添加到“对象存储库”时,才会显示此选项。
- 输入此项- 要输入的文本。您可以从“文本生成器”添加特殊键。
- 验证- 定义活动执行验证步骤。可选择以下选项:
- 无- 表示未对目标元素执行验证。
- 自动- 检查元素文本是否与输入的文本匹配。
- Expected text is - Checks whether the element text is expected text.
- 元素已出现- 检查元素是否出现。
- 元素消失- 检查元素是否消失。
- 元素文本已更改- 检查元素文本是否有任何更改。
- 元素外观已更改(仅适用于 Windows 项目)- 检查元素图像是否有任何更改。
- 预期文本- 要与实际输入结果进行比较的预期文本。仅当为“验证”选择“预期文本”选项时,此属性才可用。其默认值等于“输入此项”值。
- 在任何应用程序中指定- 允许指定不属于作为主要活动目标的“使用应用程序/浏览器”应用程序的用户界面元素。仅当验证属性设置为以下选项之一时,此属性才可用:元素出现、元素消失、元素文本已更改或元素外观已更改。
- Indicate on screen - Indicate the verification UI element to use as target. After you indicate the target, select the hamburger menu next to the informative screenshot to access the following options:
- “指定目标” - 再次指定目标。如果您只想为当前活动指定描述符,则如果在对象存储库中定义了描述符,则必须先取消其与对象存储库的链接。
- “编辑目标” - 打开选择模式以配置目标。
- 删除信息性屏幕截图 - 删除目标应用程序或网页的屏幕截图。
- 更改信息性屏幕截图 - 更改目标应用程序或网页的屏幕截图。
- 添加到对象存储库- 将当前用户界面元素添加到“对象存储库”,以便可以在整个自动化流程中重用该元素。仅当对象尚未添加到“对象存储库” 时,才显示此选项。
- 在对象存储库中显示- 打开“对象存储库” 面板,并选中“描述符”。仅当将对象添加到“对象存储库”时,才会显示此选项。
- 取消与对象存储库的链接- 取消描述符与对象存储库的链接。仅当将对象添加到“对象存储库”时,才会显示此选项。
属性面板
目标
-
“展开目标属性/折叠目标属性”按钮 - 显示/隐藏目标容器及其锚点属性。
-
定位方式- 要用于识别元素的选取器类型。此属性可以设置为任意组合,并且必须至少选择一种定位方式:
- 精确选取器
- 模糊选取器
- 图像(仅适用于 Windows 项目)
- 原生文本(仅适用于 Windows 项目)
- Computer Vision
- 语义选取器
-
Window selector (Application instance) - The selector that is used for the application window. Only applicable when the window attach mode is set to Application instance.
-
精确选取器- 为用户界面元素生成的精确选取器。仅当选择了精确选取器定位方式时,才会显示此字段。
-
模糊选取器- 模糊选取器的参数。仅当选择了模糊选取器定位方式时,才会显示此字段。
-
图像- 仅当选择图像定位方法时,这些属性才可用。
- 图像准确性- 指定用于图像匹配的置信度阈值。默认值为 0.8。
- 图像匹配项- 在找到多个匹配图像时,指定要使用的匹配项。
-
原生- 仅在选择“原生”定位方法时,这些属性才可用。
- 原生文本- 指定用于标识用户界面元素的文本。
- 原生文本匹配项- 指定在找到多个匹配项时要使用的匹配项。
- 区分原生文本的大小写- 指定文本匹配是否区分大小写。
-
Computer Vision - These properties are available only when the Computer Vision targeting method is selected. To use Computer Vision as a targeting method, you need to go to Project Settings > Computer Vision and make sure to set the correct server endpoint.
- CV 控件类型- 指定使用 Computer Vision 识别的控件的类型。
- CV 文本- 指定使用“Computer Vision”识别的文本。
- CV 文本准确度- 指定用于 OCR 文本匹配的置信度阈值。默认值为 0.7。
- CV Text occurrence - Specifies which occurrence to use when multiple matches are found.
-
Semantic selector - A semantic description that defines the target. This property is available only when the Semantic selector targeting method has been selected.
- Semantic selector method - Specifies the method used to detect elements on screen.
- Legacy - For desktop apps: Searches the elements found by the Computer Vision on screen. For web apps: Searches the elements available in the DOM. This method is deprecated.
- DOM - Searches the DOM. Reaches any element, including off-screen. Less precise on visual details. Not available on non-web applications.
- Image - Searches the screen image. Detects any object on the screen, including icons, colors, and styles. Limited to what's visible.
- Semantic selector model - Indicates the underlying LLM model used for semantic processing. This value is read-only. It can be changed only from Project settings > UI Automation > Semantic Selector > Legacy - Model / DOM - Model / Image - Model.
- Semantic selector method - Specifies the method used to detect elements on screen.
-
Wait for page load - Before performing the action, waits for the application to become ready to accept input. You can choose one of three options from the drop-down menu:
- “无”- 不等待目标变为就绪状态。
- “交互式”– 等待直到加载了应用程序的一部分。
- “完整”– 等待整个应用程序被加载。
-
可见性检查- 检查用户界面元素是否可见。您可以从下拉菜单中选择以下三个选项之一:
- 无- 不检查可见性。
- 交互式(用于模糊选取器)- 默认选项。检查元素是否可能可见,忽略页面滚动和其他应用程序的阻碍或者应用程序已最小化的情况。当尝试确保您没有以 DOM 中存在但隐藏的不可见元素为目标时,此检查非常有用。
- 完全可见- 检查用户界面元素是否可见。
-
响应式网站- 启用响应式网站布局。
目标 - 锚点 (n)
- 定位方式- 要用于识别元素的选取器类型。此属性可以设置为任意组合,并且必须至少选择一种定位方式:
- 精确选取器
- 模糊选取器
- 图像(仅适用于 Windows 项目)
- 原生文本(仅适用于 Windows 项目)
- Computer Vision
- 精确选取器- 为用户界面元素生成的精确选取器。仅当选择了精确选取器定位方式时,才会显示此字段。
- 模糊选取器- 模糊选取器的参数。仅当选择了模糊选取器定位方式时,才会显示此字段。
- 图像- 仅当选择图像定位方法时,这些属性才可用。
- 图像准确性- 指定用于图像匹配的置信度阈值。默认值为 0.8。
- 图像匹配项- 在找到多个匹配图像时,指定要使用的匹配项。
- 原生- 仅在选择“原生”定位方法时,这些属性才可用。
- 原生文本- 指定用于标识用户界面元素的文本。
- 原生文本匹配项- 指定在找到多个匹配项时要使用的匹配项。
- 区分原生文本的大小写- 指定文本匹配是否区分大小写。
- Computer Vision - 仅当选择“Computer Vision”定位方法时,这些属性才可用。
- CV 控件类型- 指定使用 Computer Vision 识别的控件的类型。
- CV 文本- 指定使用“Computer Vision”识别的文本。
- CV 文本准确度- 指定用于 OCR 文本匹配的置信度阈值。默认值为 0.7。
- CV Text occurrence - Specifies which occurrence to use when multiple matches are found.
目标 - 偏移点
Specifies an offset, which can be further configured.
- Anchoring point - Describes the starting point of the cursor to which it offsets from Offset X and Offset Y properties are added. The following options are available: Top left, Top right, Bottom left, Bottom right, and Center (selected by default).
- 偏移 X - 根据“锚点”字段中选择的选项对光标位置进行的水平位移。此字段仅支持Int32变量。
- 偏移 Y - 光标位置根据“锚点”字段中选择的选项而进行的垂直位移。此字段仅支持Int32变量。
验证执行
- 重试- 选择后,如果系统未获得预期结果,则将在活动超时的持续时间内重试该操作。
- “超时” - 等待验证元素出现、消失或更改的时间 (以秒为单位)。如果选择了重试选项,则系统将在活动“超时”属性中指定的持续时间内再次执行该操作,然后实施验证。默认值为 10 秒。
验证执行 - 目标
- Target from any application - Indicates that the selected verification target does not necessarily belong to the same application, and it is also searched in other applications.
- “展开验证执行目标属性/折叠目标属性”按钮 - 显示/隐藏验证执行目标容器及其锚点属性。
- 与Target中相同的属性也适用于“验证执行 - Target” 。
选项
- Input mode - Selects which method the Robot should use to interact with the target application:
- “与应用程序/浏览器相同” - 使用与使用应用程序/浏览器活动相同的输入模式。
- 硬件事件- 充当真实用户,使用“硬件”输入(例如移动鼠标或敲击键盘)与应用程序交互。这些是直接发送到操作系统的硬件触发事件。虽然此方法可提供 100% 的行为模拟,但某些事件偶尔可能会丢失。作为开发者,您有责任确保所有事件都能可靠地到达目标应用程序。
- Simulate - Simulates using accessibility APIs. Recommended for browsers, Java based applications, SAP. More reliable than Hardware Events for most browser and desktop apps. Sends all text in a single action. Works even if target app is not in focus. Please test if your target application UI element supports this. In the Properties panel, the Input mode auto-detection option next to the Input Mode property field automatically tests and selects the right input mode for the action you are performing. Using this feature, the text is typed into the target field with all of the available input methods, and the one that performs the best is automatically chosen. The properties Activate, Click before typing, Delay between keys, and Empty field cannot be used with the Simulate input mode.
- Chromium API - Performs actions using debugger APIs. Works for Chrome and Edge elements only. Sends all text in one go. Works if the target app is not in focus. For more details, refer to Chromium API.
- Window Messages (Windows only) - Simulates using Win32 messages. Recommended for desktop apps. More reliable than Hardware Events for most browser and desktop apps. Sends all text in a single action. Works even if target app is not in focus. Please test if your target application UI element supports this.
- Healing Agent 模式- 根据流程或作业级别的监管或 Orchestrator 设置,配置此活动的 Healing Agent 行为。
- 与应用程序/浏览器相同- 从父级“使用应用程序/浏览器”活动继承配置。
- 继承作业设置- 在流程或作业级别应用在监管或 Orchestrator 中定义的设置。
- 已禁用 - 关闭此活动的 Healing Agent。
- “仅建议” - 允许 Healing Agent 提供有关如何修复正在运行的作业中的用户界面自动化问题的建议,但前提是监管或 Orchestrator 设置允许。
- Empty field - Selects whether to delete the existing content in the field before typing the text, and how to empty the field. Fields are emptied by sending a combination of keystrokes that differs between fields with a single line and fields with multiple lines. Make sure to select the right option depending on the indicated field. The options are:
- None - Do not delete the existing content.
- Single line (End, Shift+Home, Del) - Delete the content from a text field with a single line. This is the default option.
- Multi line (Ctrl+A, Del) - Delete the content from a text field with multiple lines.
- Click before typing - Selects whether to click the specified UI element before typing the text, and the type of click to perform. The options are None (do not click), Single (execute a single click), or Double (execute a double click). The default option is Single.
- 通过剪贴板输入- 指示是否使用剪贴板输入给定文本。可用选项包括:
- “从不”- 从不使用剪贴板。
- “始终” - 始终使用剪贴板。
- 尽可能- 尽可能使用剪贴板。这取决于操作系统和要键入的文本(例如,如果使用任何特殊键,则不会使用剪贴板)。
- Activate - If selected, the specified UI element is brought to the foreground and activated before the text is typed in. If not selected, the activity types into the current active window. This field only supports Boolean values (True, False). The default value is True.
- 在末尾取消选择- 在文本输入后添加完整事件,以触发网页浏览器中的某些用户界面响应。
- 更改禁用的元素- 如果选中,则即使禁用了指定的用户界面元素,该活动也仍会执行操作。该字段仅支持“布尔值”( True 、 False )。默认值为False 。如果将“输入模式”属性设置为“硬件事件”,则此属性不适用。
- 键之间的延迟- 连续击键之间的延迟(以秒为单位)。默认值为 0.02 秒。延迟时间上限为 1 秒。
- “出错时继续”- 指定在活动抛出错误时是否应继续自动化操作。该字段仅支持“布尔值”(True 和 False)。默认值为 FALSE。因此,如果该字段为空且活动引发错误,系统将停止执行项目。如果该值设为 True,则无论出现何种错误,系统都将继续执行项目。
选项 - 偏移点
- 启用偏移点- 指示是否在活动级别启用偏移点。启用后,此参数优先于目标上配置的偏移点。
- Anchoring point - Specifies the reference point of the cursor from which the Offset X and Offset Y values are applied. The following options are available: Top left, Top right, Bottom left, Bottom right, and Center (selected by default).
- “偏移 X” - 定义光标位置相对于所选锚点的水平位移。
- “偏移 Y” - 定义光标位置相对于所选锚点的垂直位移。
计时
- Delay before - Delay (in seconds) between the time the previous activity is completed and the time this activity begins performing any operations. The default value is 0.2 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.
- Delay after - Delay (in seconds) between the time this activity is completed and the time the next activity begins any operations. The default value is 0.3 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.
- Timeout - Specifies the amount of time (in seconds) to wait for the operation to be performed before generating an error. The default value is 30 seconds.
输入/输出
- “输入元素” - 要在其上执行活动的用户界面元素,存储在
UIElement对象中。此字段仅支持UIElement对象。可以从其他用户界面自动化活动的“输出元素”属性字段中获取该对象。 - Output element - Outputs a target UI Element and stores it in a
UIElementobject, which can be further used to target the same element with other UI Automation activities.
Windows - 旧版配置
- 选择“在应用程序/浏览器中指明” ,以指定用作目标的用户界面元素。如果元素已在目标应用程序中聚焦,则不需要此步骤。
指定目标后,选择“菜单”
按钮以访问以下选项:
- Indicate target on screen - Indicate the target again.
- “编辑目标” - 打开选择模式以配置目标。
- 添加自动验证/删除验证- 添加或删除对活动执行的操作的验证。默认情况下会启用验证执行。
- 删除信息性屏幕截图 - 删除目标应用程序或网页的屏幕截图。
- 添加到对象存储库- 将当前用户界面元素添加到库项目中,这样就可以在整个自动化流程中重用该元素。
-
输入- 要输入的文本。您可以使用下拉菜单选择要发送到文本字段的特殊键,也可以从文本生成器中添加特殊键。您还可以使用“加号”中的选项
文本生成器中的菜单,以添加保存以备后用的值,或者从项目笔记本或父级“使用 Excel 文件”或“使用 Outlook 帐户”活动中添加数据。支持文本、Excel 或 Outlook 数据以及特殊键的任意组合。 -
Empty field before typing - Selects whether to delete the existing content in the field before typing the text, and how to empty the field. Fields are emptied by sending a combination of keystrokes that differs between fields with a single line and fields with multiple lines. Make sure to select the right option depending on the indicated field. The options are:
- None - Do not delete the existing content.
- Single line (End, Shift+Home, Del) - Delete the content from a text field with a single line. This is the default option.
- Multi line (Ctrl+A, Del) - Delete the content from a text field with multiple lines.
To use the activity to clear the indicated text field, configure this property to delete the existing content, leave the Type this field empty, and set the Input Mode property to Hardware Events.
-
Click before typing - Selects whether to click the specified UI element before typing the text, and the type of click to perform. The options are None (do not click), Single (execute a single click), or Double (execute a double click). The default option is Single.
-
验证文本是否为空- 如果选中“添加自动验证”,则会显示此选项。您可以指定在当前应用程序或任何应用程序中。
属性面板
常见
-
“出错时继续”- 指定在活动抛出错误时是否应继续自动化操作。该字段仅支持“布尔值”(True 和 False)。默认值为 FALSE。因此,如果该字段为空且活动引发错误,系统将停止执行项目。如果该值设为 True,则无论出现何种错误,系统都将继续执行项目。
-
Delay after - Delay (in seconds) between the time this activity is completed and the time the next activity begins any operations. The default value is 0.3 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.
-
Delay before - Delay (in seconds) between the time the previous activity is completed and the time this activity begins performing any operations. The default value is 0.2 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.
-
显示名称 -“设计器”面板中活动的显示名称。 指定目标时,系统会自动生成显示名称。
-
Timeout - Specifies the amount of time (in seconds) to wait for the activity to be executed before throwing an error. The default value is 30 seconds.
-
Secure text - The secure text to enter. The field supports only SecureString variables. If this field is configured, the Text field is cleared. The maximum string length for this field is 65536 characters.
-
“目标” - 目标元素。必须设置目标元素。在屏幕上指示之前,此字段设置为
(null)。指定目标后,将显示与指定元素相关的所有属性。- 单击偏移量- 指定单击活动的偏移量,您可以进一步配置该偏移量。
- Anchoring point - Describes the starting point of the cursor to which it offsets from Offset X and Offset Y properties are added. The following options are available: Top left, Top right, Bottom left, Bottom right, and Center. By default, Center is selected.
- 偏移 X - 根据“锚点”字段中选择的选项对光标位置进行的水平位移。此字段仅支持
Int32变量。 - 偏移 Y - 光标位置根据“锚点”字段中选择的选项而进行的垂直位移。此字段仅支持
Int32变量。
- CV 控件类型- 表示使用 Computer Vision 识别的控件的类型。
- CV 文本- 表示使用 Computer Vision 识别的文本。
- Fuzzy selector - The parameters for the fuzzy selector.
- 原生文本- 用于标识用户界面元素的文本。
- 响应式网站- 启用响应式网站布局。
- 精确选取器- 为用户界面元素生成的精确选取器。
- 定位方式- 要用于识别元素的选取器类型。从下拉菜单中选择此属性后,可将其设置为任意组合:
- 无
- 精确选取器
- 模糊选取器
- 图像
- 原生文本
- Computer Vision - 要将 Computer Vision 用作定位方法,您需要转到“项目设置” > “Computer Vision” ,并确保设置正确的服务器端点。您可以原样保留此字段,并使用 UiPath Cloud(默认情况下已填写),也可以通过选择特定于服务器区域的任何其他公共端点或您自己的本地部署服务器来输入其他值。将 Computer Vision 用作定位方法的另一种方法是将“使用本地服务器”设置为True 。这意味着 UiPath.ComputerVision.LocalServer 包已安装在项目中。启用“本地服务器”后,服务器值将被覆盖。但是,“本地服务器”在跨平台项目中不可用。
- 可见性检查- 检查用户界面元素是否可见。您可以从下拉菜单中选择以下三个选项之一:
- 无- 不检查可见性。
- 交互式(用于模糊选取器)- 默认选项。检查元素是否可能可见,忽略页面滚动和其他应用程序的阻碍或者应用程序已最小化的情况。当尝试确保您没有以 DOM 中存在但隐藏的不可见元素为目标时,此检查非常有用。
- 完全可见
- 检查用户界面元素是否可见。
- Wait for page load - Before performing the action, waits for the application to become ready to accept input. You can choose one of three options from the drop-down menu:
- “无”- 不等待目标变为就绪状态。
- “交互式”– 等待直到加载了应用程序的一部分。
- “完整”– 等待整个应用程序被加载。
- 窗口选取器(应用程序实例) - 用于应用程序窗口的选取器。仅在窗口附加模式设置为“应用程序实例”时可用。
- 单击偏移量- 指定单击活动的偏移量,您可以进一步配置该偏移量。
-
Text - The text to enter. You can add special keys to the text from the drop-down list in the body of the activity. If this field is configured, the Secure text field is cleared. The maximum string length for this field is 65536 characters.
-
验证执行- 在运行时,验证活动执行的操作是否正确。为此,可以在执行活动后验证“预期文本”属性中指定的文本是否存在于指定的用户界面元素中,也可以指定应在操作执行后出现或消失的元素(在操作执行后,该元素会受到监控并验证)该活动随即执行。通过从上下文菜单中选择 添加自动验证, 可以从 项目设置 或从活动的主体中启用此功能。
- “显示名称” - 验证操作的显示名称。系统会根据您选择的验证操作和元素自动填充此字段。设置“验证执行”后,此显示名称将在活动卡中可见。
- 预期文本- 预期在指定文本字段中键入的文本。此字段是可选的。此字段仅支持字符串和
String变量。 - “重试” - 选择后,如果系统未获得预期结果,则将在活动超时的持续时间内再次执行此操作。默认情况下,该复选框处于选中状态。
- “目标” - 此目标用于指示要在运行时验证的元素。有关可在此属性下展开的属性字段的更多信息,请参阅上面的“目标”属性,因为属性的功能是相同的。
- “超时” - 等待验证元素出现、消失或更改的时间(以秒为单位)。如果选择“重试”复选框,则系统将在活动的“超时”属性中指定的持续时间内再次执行此操作,然后实施验证。默认值为 10 秒。
- 验证元素
- 定义要检查验证目标的更改。可用选项包括:
- “已出现” - 检查元素是否出现。
- “已消失” - 检查元素是否已消失。
- 文本已更改- 检查元素文本是否有任何更改。
- 视觉上已更改- 检查元素的图像是否发生任何更改。
-
“输入元素” - 要在其上执行活动的用户界面元素,存储在
UIElement对象中。此字段仅支持UIElement对象。可以从其他用户界面自动化活动的“输出元素”属性字段中获取该对象。 -
“输出元素” - 输出目标用户界面元素,并将其存储在
UIElement对象中,该对象可进一步用于与其他活动针对同一元素。 -
“私有” - 选中后将不再以“Verbose”级别记录变量和参数的值。该字段仅支持“布尔值”( True 、 False )值。默认值为False 。
-
更改禁用的元素- 如果选中,则即使禁用了指定的用户界面元素,该活动也仍会执行操作。该字段仅支持“布尔值”( True 、 False )。默认值为False 。
如果输入模式属性设置为硬件事件,则此属性不适用。
- Input mode - Selects which method the Robot should use to interact with the target application:
- 与应用程序/浏览器相同- 使用与使用应用程序/浏览器活动相同的输入模式。这是默认选择。
- 硬件事件- 使用硬件驱动程序执行操作。该方法速度最慢。该活动不能在后台工作,但与所有桌面应用程序兼容。
- Simulate - Simulates using accessibility APIs. Recommended for browsers, Java based applications, SAP. More reliable than Hardware Events for most browser and desktop apps. Sends all text in a single action. Works even if target app is not in focus. Please test if your target application UI element supports this.
在“属性”面板中,
“输入模式”属性字段旁边的按钮会自动测试,并为正在执行的操作选择正确的输入模式。使用此功能,使用所有可用输入方法在目标字段中键入文本,并自动选择性能最佳的输入方法。
The properties Activate, Click before typing, Delay between keys, and Empty field cannot be used with the Simulate input mode.
- Chromium API - 使用调试器 API 执行操作。仅适用于 Chromium 元素。在单个操作中发送所有文本。即使目标应用程序不在焦点中,也适用。有关更多详细信息,请参阅Chromium API 。
- Window Messages - Simulates using Win32 messages. Recommended for desktop apps. More reliable than Hardware Events for most browser and desktop apps. Sends all text in a single action. Works even if target app is not in focus. Please test if your target application UI element supports this.
选项 - 硬件事件/Chromium API
- Activate - Brings the UI element to the foreground and activates it before clicking it. If not selected, the activity types into the current active window. This field only supports Boolean values (True, False). The default value is True.
- 输入前单击- 在“设计器” 面板中查看输入前单击。
- 键之间的延迟- 连续击键之间的延迟(以秒为单位)。默认值为 0.02 秒。延迟时间上限为 1 秒。
- “空字段” - 在“设计器” 面板中键入内容之前,请“查看空字段” 。
- 通过剪贴板输入- 指示是否使用剪贴板输入给定文本。可用选项包括:
- “从不”- 从不使用剪贴板。
- “始终” - 始终使用剪贴板。
- 尽可能- 尽可能使用剪贴板。这取决于操作系统和要键入的文本(例如,如果使用任何特殊键,则不会使用剪贴板)。
选项 - 模拟
- Deselect at end - This check box can only be used when the Input Mode property is set to Simulate and is selected by default. Some target applications do not register a type action unless a Complete event is also sent alongside the action. Selecting this check box adds a Complete event after the text entry, in order to register the action correctly. If this check box is cleared, the Complete event is not sent to the target application. By default, this check box is selected.