- 概述
- 用户界面自动化
- 关于“用户界面自动化”活动包
- 通过用户界面自动化实现自动化的应用程序和技术
- 项目兼容性
- 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 浏览器迁移工具
- 剪切区域
- 计算机视觉录制器
- 活动索引
- 激活
- 锚点基准
- 附加浏览器
- 附加窗口
- 阻止用户输入
- 标注
- 选中
- 单击
- 单击图像
- 单击图像触发器
- 单击 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
- 移动自动化
- 终端

用户界面自动化活动
要自动执行用户界面中的特定操作,您需要与各种窗口、按钮、下拉列表以及许多其他元素交互。可以识别用户界面元素的一种方法是使用它们在屏幕上的位置,但这可能不可靠。
为了解决这个问题,Studio 使用了选取器。它们以 XML 片段的形式存储图形用户界面元素及其父元素的属性。
大多数情况下,选取器是由 Studio 自动生成的,并且不需要您额外输入,特别是当您尝试自动化的应用程序具有静态用户界面时。
然而,某些软件程序的布局会不断变化,且属性节点的值不稳定,例如某些网页应用程序。Studio 无法预测这些更改,因此,您可能必须手动生成一些选取器。
选取器具有以下结构:
<node_1/><node_2/>...<node_N/><node_1/><node_2/>...<node_N/>最后一个节点表示您感兴趣的图形用户界面元素,而前面的所有节点都表示该元素的父元素。<node_1> 通常称为根节点,表示应用程序的顶部窗口。
每个节点都有一个或多个属性,可以帮助您正确识别所选应用程序的特定级别。
每个节点的格式如下:
<ui_system attr_name_1='attr_value_1' ... attr_name_N='attr_value_N'/><ui_system attr_name_1='attr_value_1' ... attr_name_N='attr_value_N'/>每个属性都有一个赋值。重要的是选择具有常量值的属性。如果每次应用程序启动时,属性的值都会发生变化,则选取器将无法正确识别元素。
系统会在活动“属性”面板中的“输入”>“目标”>“选取器”下现实选取器。与图形元素相关的所有活动都具有此属性。
“选择选项”窗口用于选择和编辑目标。要访问此窗口,请在“工作流设计器”面板中单击“选项”
按钮,然后选择“在屏幕上指定目标”或“编辑目标”。
The Selector Editor window enables you to see the automatically-generated selector and edit it and its attributes. To access this window, use the Ellipsis button next to the Selector field, in the Properties panel.
|
选项 |
描述 |
|---|---|
|
验证 |
该按钮通过检查选取器定义的有效性以及目标元素在屏幕上的可见性来显示选取器的状态。 验证按钮具有三种状态:
该按钮与用户界面探测器验证状态相关。 |
|
指出元素 |
指出一个新的用户界面元素以替换前一个。 |
|
修复 |
使您能够重新指定相同的目标用户界面元素并修复选取器。此操作并不完全替换以前的选取器。只有在选取器无效时,该按钮才可用。 |
|
高亮显示 |
将目标元素置于前台。高亮显示一直持续到该选项被单击禁用为止。仅当选取器有效时才会启用该按钮。 |
|
编辑属性 |
包含标识目标应用程序时所需的所有应用程序组件(窗口、按钮等)。该部分可以编辑。 |
|
编辑选取器 |
保存实际的选取器。该部分可以编辑。 |
|
在用户界面探测器中打开 |
启动用户界面探测器。该选项仅对有效的选取器启用。 |
下表列出了用于构建选取器和选取器功能的标签和属性之间的兼容性。
wnd、ax、java 和 sap 可用于不同用例:
- AX 选取器可用于所有类型的 macOS 桌面应用程序。
- SAP 选取器可用于 macOS 上的 SAP GUI for Java,需要启用脚本功能的 SAP 服务器。这些选取器对 SAP 应用程序最稳定,提供最全面的功能,例如提取表格数据。
- Java 选取器可用于 Java 应用程序。由于 SAP GUI for Java 也是一个基于 Java 的应用程序,因此可以使用 Java 选择策略从默认选取器切换,以获取 Java 选取器。
WND
|
属性 |
模糊 |
正则表达式 |
区分大小写 | 操作系统 |
|---|---|---|---|---|
|
app |
|
|
|
Windows macOS |
|
cls |
|
|
| Windows |
|
title |
|
|
|
Windows macOS |
|
aaname |
|
|
| Windows |
|
ctrlname (WinForms) |
|
|
| Windows |
|
ctrlid (WinForms) |
|
|
| Windows |
|
idx |
|
|
|
Windows macOS |
|
tid |
|
|
|
Windows macOS |
|
pid |
|
|
|
Windows macOS |
|
isremoteapp |
|
|
| Windows |
|
aastate |
|
|
| Windows |
| 角色 | macOS | |||
| enabled | macOS | |||
| focused | macOS | |||
| 已选定 | macOS | |||
| 已展开 | macOS | |||
|
sapClient (SAP) |
|
|
|
Windows macOS |
|
sapLanguage (SAP) |
|
|
|
Windows macOS |
|
sapProgram (SAP) |
|
|
|
Windows macOS |
|
sapScreen (SAP) |
|
|
|
Windows macOS |
|
sapSession (SAP) |
|
|
|
Windows macOS |
|
sapSysName (SAP) |
|
|
|
Windows macOS |
|
sap 系统编号 (SAP) |
|
|
|
Windows macOS |
|
sapSysSessionId (SAP) |
|
|
|
Windows macOS |
|
sapTransaction (SAP) |
|
|
|
Windows macOS |
|
sapUser (SAP) |
|
|
|
Windows macOS |
| curlApplet(Curl) | Windows |
HTML
|
属性 |
模糊 |
正则表达式 |
区分大小写 | 操作系统 |
|---|---|---|---|---|
|
url |
|
|
|
Windows macOS Linux |
|
htmlwindowname |
|
|
|
Windows macOS Linux |
|
title |
|
|
|
Windows macOS Linux |
|
class |
|
|
|
Windows macOS Linux |
|
app |
|
|
|
Windows macOS Linux |
|
idx |
|
|
|
Windows macOS Linux |
|
pid |
|
|
|
Windows macOS Linux |
|
tid |
|
|
|
Windows macOS Linux |
|
excludehwnd |
|
|
|
Windows macOS Linux |
|
bsid(浏览器会话 ID) |
|
|
|
Windows macOS Linux |
|
isremoteapp |
|
|
|
Windows macOS Linux |
WEBCTRL
tag 和 idx 属性使用字符串值。所有其他 WEBCTRL 属性都具有动态值。
|
属性 |
模糊 |
正则表达式 |
区分大小写 | 操作系统 |
|---|---|---|---|---|
|
tag |
|
|
|
Windows macOS Linux |
|
idx |
|
|
|
Windows macOS Linux |
|
aaname |
|
|
|
Windows macOS Linux |
|
name |
|
|
|
Windows macOS Linux |
|
id |
|
|
|
Windows macOS Linux |
|
parentid |
|
|
|
Windows macOS Linux |
|
class |
|
|
|
Windows macOS Linux |
|
css-selector |
|
|
|
Windows macOS Linux |
|
innertext |
|
|
|
Windows macOS Linux |
|
visibleinnertext |
|
|
|
Windows macOS Linux |
|
isleaf |
|
|
|
Windows macOS Linux |
|
parentclass |
|
|
|
Windows macOS Linux |
|
parentname |
|
|
|
Windows macOS Linux |
|
src |
|
|
|
Windows macOS Linux |
|
href |
|
|
|
Windows macOS Linux |
|
tableCol |
|
|
|
Windows macOS Linux |
|
tableRow |
|
|
|
Windows macOS Linux |
|
colName |
|
|
|
Windows macOS Linux |
|
rowName |
|
|
|
Windows macOS Linux |
|
aria-label |
|
|
|
Windows macOS Linux |
|
aria-labelledby |
|
|
|
Windows macOS Linux |
CTRL
|
属性 |
模糊 |
正则表达式 |
区分大小写 | 操作系统 |
|---|---|---|---|---|
|
角色 |
|
|
| Windows |
|
name |
|
|
| Windows |
|
automationid |
|
|
| Windows |
|
labeledby |
|
|
| Windows |
|
aastate |
|
|
| Windows |
|
virtualname |
|
|
| Windows |
|
text |
|
|
| Windows |
|
rowName |
|
|
| Windows |
|
idx |
|
|
| Windows |
UIA
|
属性 |
模糊 |
正则表达式 |
区分大小写 | 操作系统 |
|---|---|---|---|---|
|
accelkey(加速键) |
|
|
| Windows |
|
acskey(访问密钥) |
|
|
| Windows |
|
automationid |
|
|
| Windows |
|
cls |
|
|
| Windows |
|
helpText |
|
|
| Windows |
|
legacyAccHelp(旧版辅助功能帮助) |
|
|
| Windows |
|
enabled |
|
|
| Windows |
|
kbfocus(键盘是否可聚焦) |
|
|
| Windows |
|
ispwd(为密码) |
|
|
| Windows |
|
itemstatus |
|
|
| Windows |
|
itemtype |
|
|
| Windows |
|
rtid(运行时 ID) |
|
|
| Windows |
|
角色 |
|
|
| Windows |
|
name |
|
|
| Windows |
|
pid |
|
|
| Windows |
|
tableRow |
|
|
| Windows |
|
tableCol |
|
|
| Windows |
|
rowName |
|
|
| Windows |
|
colName |
|
|
| Windows |
|
idx |
|
|
| Windows |
Java
|
属性 |
模糊 |
正则表达式 |
区分大小写 | 操作系统 |
|---|---|---|---|---|
|
角色 |
|
|
|
Windows macOS |
|
name |
|
|
|
Windows macOS |
|
virtualname |
|
|
|
Windows macOS |
|
javastate |
|
|
|
Windows macOS |
|
tableRow |
|
|
|
Windows macOS |
|
tableCol |
|
|
|
Windows macOS |
|
rowName |
|
|
|
Windows macOS |
|
colName |
|
|
|
Windows macOS |
|
idx |
|
|
|
Windows macOS |
| cls |
Windows macOS | |||
| accessibleClass |
Windows macOS |
SAP
|
属性 |
模糊 |
正则表达式 |
区分大小写 | 操作系统 |
|---|---|---|---|---|
|
id |
|
|
|
Windows macOS |
|
leafid “属性”面板未公开此属性,因其与“id”属性互斥。不过可以手动添加。 |
|
|
|
Windows macOS |
|
tableRow |
|
|
|
Windows macOS |
|
tableCol |
|
|
|
Windows macOS |
|
colName |
|
|
|
Windows macOS |
|
relpath |
|
|
|
Windows macOS |
|
itemId |
|
|
|
Windows macOS |
AX
| 属性 | 模糊 | 正则表达式 | 区分大小写 | 操作系统 |
|---|---|---|---|---|
| 角色 | macOS | |||
| subrole | macOS | |||
| name | macOS | |||
| title | macOS | |||
| 标识符 | macOS | |||
| 文件名 | macOS | |||
| url | macOS | |||
| 帮助 | macOS | |||
| enabled | macOS | |||
| focused | macOS | |||
| 已选定 | macOS | |||
| 已展开 | macOS | |||
| idx | macOS |
cURL
| 属性 | 模糊 | 正则表达式 | 区分大小写 | 操作系统 |
|---|---|---|---|---|
| cls | Windows | |||
| 角色 | Windows | |||
| text | Windows | |||
| title | Windows | |||
| tableRow | Windows | |||
| tableCol | Windows | |||
| colHeader | Windows | |||
| idx | Windows |
Silverlight
| 属性 | 模糊 | 正则表达式 | 区分大小写 | 操作系统 |
|---|---|---|---|---|
| 角色 | Windows | |||
| name | Windows | |||
| text | Windows | |||
| idx | Windows |
RDP
RDP 标签用于远程自动化,其属性与 WND 标签相同。
| 属性 | 模糊 | 正则表达式 | 区分大小写 | 操作系统 |
|---|---|---|---|---|
| app | Windows | |||
| cls | Windows | |||
| title | Windows | |||
| aaname | Windows | |||
| ctrlname (WinForms) | Windows | |||
| ctrlid (WinForms) | Windows | |||
| idx | Windows | |||
| tid | Windows | |||
| pid | Windows |
正在验证选取器
有效选取器
无效选取器
修改的选取器,重新验证