- 入门指南
- 设置和配置
- 自动化项目
- 依赖项
- 工作流类型
- 控制流程
- 文件比较
- 自动化最佳实践
- 源代码控件集成
- 调试
- 日志记录
- 诊断工具
- 工作流分析器
- 变量
- 参数
- 导入的命名空间
- 编码自动化
- 基于触发器的 Attended 自动化
- 对象存储库
- ScreenScrapeJavaSupport 工具
- 扩展程序
- Studio 测试
- 故障排除
在 Mac 上安装 UiPath Chrome 扩展程序,以实现浏览器自动化,其中包括用户级别或计算机范围的安装选项。
此扩展可帮助您在 Mac 上的 Google Chrome 中创建浏览器自动化。
安装
您可以使用以下方法之一安装 Chrome 扩展程序:
您可使用UiPath Assistant或从终端(调用UiPath.ExtensionControl.Portable.dll )执行安装。
UiPath Assistant和UiPath.ExtensionControl.Portable.dll安装最新的扩展程序版本,如下所示:
| 安装类型 | 扩展程序版本 |
|---|---|
| 当前用户 | 最新的 UiPath Studio Web 扩展程序发布在 Chrome 网上应用店。 |
| 所有用户 | 最新的 UiPath Studio Web 扩展程序发布在 Chrome 网上应用店。 |
| 在线组策略 | 最新的 UiPath Studio Web 扩展程序发布在 Chrome 网上应用店。 |
| 离线组策略 | 与UiPath Assistant捆绑的最新自托管扩展程序。 |
| 当前用户(仅限原生消息传递主机) | 最新的 UiPath Studio Web 扩展程序发布在 Chrome 网上应用店。 |
| 所有用户(仅限原生消息传递主机) | 最新的 UiPath Studio Web 扩展程序发布在 Chrome 网上应用店。 |
您也可以使用 UiPath.ExtensionControl.Portable.dll 安装特定浏览器扩展程序版本。使用 help 命令运行以获取详细信息:
dotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll help install chrome
dotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll help install chrome
当前用户
此方法仅为当前用户安装扩展程序。它会创建或更新 Chrome 用于检测扩展程序的 JSON 配置文件。这些文件定义扩展程序 ID、更新 URL 以及原生消息传递主机的路径。
A. 使用 UiPath Assistant 安装步骤
-
访问 UiPath Assistant。
-
选择帐户图标。
-
选择“首选项”。
-
转到 UiPath 扩展程序。
-
使用Google Chrome的下拉列表选择“当前用户”安装类型。
-
选择“安装” 。
-
在 Google Chrome 确认弹出窗口中选择“启用扩展程序”。
结果:扩展程序已安装并启用。
B. 使用 UiPath.ExtensionControl.Portable.dll(从终端)安装步骤
先决条件:
- 始终使用
/Applications目录中的UiPath.ExtensionControl.Portable.dll文件运行命令,因为对来自其他位置的二进制文件执行操作时,macOS 比较敏感。 - 运行命令之前,关闭所有 Chrome 窗口。
-
打开终端并运行以下命令:
dotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install chromedotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install chrome -
在 Google Chrome 确认弹出窗口中选择“启用扩展程序”。
结果:扩展程序已安装并启用。
添加 --ext-id={extensionId} 选项以针对特定扩展程序版本;如果省略,则安装发布到网上应用店的最新版本。有关可用的 ID,请参阅Studio - Chrome 扩展程序列表。
所有用户
此方法会为计算机上的所有用户安装扩展程序。此方法会创建或更新 Chrome 用于检测扩展程序的 JSON 配置文件,运行方式与“当前用户”方法类似。区别在于文件位置:此方法会将配置文件写入系统级位置,而“当前用户”方法会将配置文件写入用户专属位置。
A. 使用 UiPath Assistant 安装步骤
-
访问 UiPath Assistant。
-
选择帐户图标。
-
选择“首选项”。
-
转到 UiPath 扩展程序。
-
使用Google Chrome的下拉列表选择“所有用户”安装类型。
-
选择“安装” 。
-
在UiPath Assistant 的确认弹出窗口中输入管理员密码。
-
在 Google Chrome 确认弹出窗口中选择“启用扩展程序”。
结果:扩展程序已安装并启用。
B. 使用 UiPath.ExtensionControl.Portable.dll(从终端)安装步骤
先决条件:
- 始终使用
/Applications目录中的UiPath.ExtensionControl.Portable.dll文件运行命令,因为对来自其他位置的二进制文件执行操作时,macOS 比较敏感。 - 运行命令之前,关闭所有 Chrome 窗口。
-
打开终端并运行以下命令:
sudo dotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install chrome --scope=machinesudo dotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install chrome --scope=machine -
在 Google Chrome 确认弹出窗口中选择“启用扩展程序”。
结果:扩展程序已安装并启用。
- 运行此命令需要使用
sudo,因为命令会更新系统配置文件。 - 添加
--ext-id={extensionId}选项以针对特定扩展程序版本;如果省略,则安装发布到网上应用店的最新版本。有关可用的 ID,请参阅Studio - Chrome 扩展程序列表。
在线组策略
使用此方法,无需在首次启动 Chrome 后执行手动启用扩展程序的步骤。这是因为它依赖于 MDM(移动设备管理)工具部署的配置配置文件。
配置文件会设置 ExtensionInstallForcelist 策略。此策略能够确保扩展程序已启用,且无法手动禁用。
此过程与此处所述的 Windows 组策略在线安装方法类似:Studio - Chrome 扩展程序。
MDM 要求
要安装配置文件(.mobileconfig 文件),计算机上必须有 MDM 应用程序,并且必须注册计算机才能进行管理。
MDM 的示例包括:
如果设备已注册在 MDM 解决方案中,请确保该配置不会被通过 MDM 推送的配置更新覆盖。为避免此情况,请直接通过 MDM 部署配置文件。配置文件应包含与以下示例类似的设置:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<!-- This policy ensures that the {extensionId} is enabled -->
<key>ExtensionInstallForcelist</key>
<array>
<string>{extensionId};https://clients2.google.com/service/update2/crx</string>
</array>
<!-- These policies specifically enable the Developer mode for {extensionId} -->
<key>DeveloperToolsAvailabilityAllowlist</key>
<array>
<string>chrome-extension://{extensionId}</string>
</array>
<key>DeveloperToolsAvailabilityBlocklist</key>
<array>
<string>https://uipath-devtools-blocklist-placeholder.invalid</string>
</array>
<!-- Alternatively, this policy globally enables the Developer mode in chrome://extensions.
Can be used in place of DeveloperToolsAvailabilityAllowlist / DeveloperToolsAvailabilityBlocklist -->
<key>DeveloperToolsAvailability</key>
<integer>1</integer>
<!-- The policies below are not mandatory, but they are useful in some systems,
depending on the already present configuration -->
<key>BlockExternalExtensions</key>
<false/>
<key>ExtensionAllowedTypes</key>
<array>
<string>extension</string>
</array>
<key>NativeMessagingUserLevelHosts</key>
<true/>
<key>NativeMessagingAllowlist</key>
<array>
<string>com.uipath.portable_host</string>
</array>
<key>PayloadDisplayName</key>
<string>Google Chrome</string>
<key>PayloadIdentifier</key>
<string>com.google.Chrome.2C2280F4-2955-49E9-8161-A599B9BB6685</string>
<key>PayloadType</key>
<string>com.google.Chrome</string>
<key>PayloadUUID</key>
<string>2C2280F4-2955-49E9-8161-A599B9BB6685</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</array>
<key>PayloadDisplayName</key>
<string>UiPath Studio Web Automation Chrome Extension Installation</string>
<key>PayloadIdentifier</key>
<string>com.uipath.chrome.extension.A64BC628-4ECF-4A71-91D5-20D7C7475C38</string>
<key>PayloadOrganization</key>
<string>com.uipath</string>
<key>PayloadScope</key>
<string>System</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>A64BC628-4ECF-4A71-91D5-20D7C7475C38</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>TargetDeviceType</key>
<integer>5</integer>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<!-- This policy ensures that the {extensionId} is enabled -->
<key>ExtensionInstallForcelist</key>
<array>
<string>{extensionId};https://clients2.google.com/service/update2/crx</string>
</array>
<!-- These policies specifically enable the Developer mode for {extensionId} -->
<key>DeveloperToolsAvailabilityAllowlist</key>
<array>
<string>chrome-extension://{extensionId}</string>
</array>
<key>DeveloperToolsAvailabilityBlocklist</key>
<array>
<string>https://uipath-devtools-blocklist-placeholder.invalid</string>
</array>
<!-- Alternatively, this policy globally enables the Developer mode in chrome://extensions.
Can be used in place of DeveloperToolsAvailabilityAllowlist / DeveloperToolsAvailabilityBlocklist -->
<key>DeveloperToolsAvailability</key>
<integer>1</integer>
<!-- The policies below are not mandatory, but they are useful in some systems,
depending on the already present configuration -->
<key>BlockExternalExtensions</key>
<false/>
<key>ExtensionAllowedTypes</key>
<array>
<string>extension</string>
</array>
<key>NativeMessagingUserLevelHosts</key>
<true/>
<key>NativeMessagingAllowlist</key>
<array>
<string>com.uipath.portable_host</string>
</array>
<key>PayloadDisplayName</key>
<string>Google Chrome</string>
<key>PayloadIdentifier</key>
<string>com.google.Chrome.2C2280F4-2955-49E9-8161-A599B9BB6685</string>
<key>PayloadType</key>
<string>com.google.Chrome</string>
<key>PayloadUUID</key>
<string>2C2280F4-2955-49E9-8161-A599B9BB6685</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</array>
<key>PayloadDisplayName</key>
<string>UiPath Studio Web Automation Chrome Extension Installation</string>
<key>PayloadIdentifier</key>
<string>com.uipath.chrome.extension.A64BC628-4ECF-4A71-91D5-20D7C7475C38</string>
<key>PayloadOrganization</key>
<string>com.uipath</string>
<key>PayloadScope</key>
<string>System</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>A64BC628-4ECF-4A71-91D5-20D7C7475C38</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>TargetDeviceType</key>
<integer>5</integer>
</dict>
</plist>
如果设备未在 MDM 解决方案中注册,则系统会将所需的配置文件写入在本地,不会被 MDM 应用的策略覆盖。这允许 Chrome 应用策略并确保无需用户交互即可启用扩展程序。
A. 使用 UiPath Assistant 安装步骤
-
访问 UiPath Assistant。
-
选择帐户图标。
-
选择“首选项”。
-
转到 UiPath 扩展程序。
-
使用Google Chrome的下拉列表选择“按策略”安装类型。
-
选择“安装” 。
-
在UiPath Assistant 的确认弹出窗口中输入管理员密码。
结果:扩展程序已安装并启用。
B. 使用 UiPath.ExtensionControl.Portable.dll(从终端)安装步骤
先决条件:
- 始终使用
/Applications目录中的UiPath.ExtensionControl.Portable.dll文件运行命令,因为对来自其他位置的二进制文件执行操作时,macOS 比较敏感。 - 运行命令之前,关闭所有 Chrome 窗口。
- 要仅为当前用户而不是所有用户安装,请在以下命令中将
--scope=machine替换为--scope=user;其他用户将无法安装该扩展程序。
如果计算机注册了 MDM,则需要确保策略不会覆盖。有关更多详细信息,请参阅MDM 要求。
-
打开终端并运行以下命令:
sudo dotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install chrome bypolicy --scope=machinesudo dotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install chrome bypolicy --scope=machine
结果:扩展程序已安装并启用。
- 运行此命令需要
sudo,因为它会更新系统配置文件,并且bypolicy选项会自动将作用域设置为计算机。 - 添加
--ext-id={extensionId}选项以针对特定扩展程序版本;如果省略,则安装发布到网上应用店的最新版本。有关可用 ID,请参阅Studio - Chrome 扩展程序列表。
离线组策略
此过程与此处所述的 Windows 组策略离线安装方法类似:Studio - Chrome 扩展程序。
此方法依赖于 MDM(移动设备管理)工具部署的配置文件。“配置”配置文件将应用“ExtensionInstallForcelist”策略,该策略可确保扩展程序自动启用,并且用户无法禁用。它还会配置开发者工具可用性允许列表/开发者工具可用性阻止列表策略,以专门允许开发者工具访问 UiPath 扩展程序。
此方法:
- 用于安装任何已发布到网上应用店或未发布的扩展程序。
- 在互联网访问受限(无法访问
https://clients2.google.com/service/update2/crx)的环境中非常有用。
- 此方法仅适用于注册了 MDM 的计算机。有关更多详细信息,请参阅MDM 要求。
A. 使用 UiPath Assistant 安装步骤
-
访问 UiPath Assistant。
-
选择帐户图标。
-
选择“首选项”。
-
转到 UiPath 扩展程序。
-
使用Google Chrome的下拉列表选择“按策略(离线)”安装类型。
-
选择“安装” 。
-
在UiPath Assistant 的确认弹出窗口中输入管理员密码。
结果:扩展程序已安装并启用。
B. 使用 UiPath.ExtensionControl.Portable.dll(从终端)安装步骤
先决条件:
- 始终使用
/Applications目录中的UiPath.ExtensionControl.Portable.dll文件运行命令,因为对来自其他位置的二进制文件执行操作时,macOS 比较敏感。 - 运行命令之前,关闭所有 Chrome 窗口。
- 要仅为当前用户而不是所有用户安装,请将
--scope=user添加到以下命令中;默认情况下,bypolicy选项将作用域设置为计算机。
-
打开终端并运行以下命令:
sudo dotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install chrome bypolicy --offlinesudo dotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install chrome bypolicy --offline -
启动 Chrome。
-
设计和运行自动化。
结果:扩展程序已安装并启用。
运行此命令需要 sudo,因为它会更新系统配置文件。使用 bypolicy 选项会自动将作用域设置为计算机。
当前用户(仅限原生消息传递主机)
此方法仅为当前用户安装扩展程序的原生消息传递主机组件。它会创建或更新 Chrome 使用的 JSON 配置文件,以允许与原生主机进行通信。
A. 使用 UiPath Assistant 安装步骤
-
访问 UiPath Assistant。
-
选择帐户图标。
-
选择“首选项”。
-
转到 UiPath 扩展程序。
-
使用Google Chrome的下拉列表选择“当前用户(仅限原生消息传递主机)”安装类型。
-
选择“安装” 。
结果:扩展程序的原生消息传递主机组件已安装。
B. 使用 UiPath.ExtensionControl.Portable.dll(从终端)安装步骤
先决条件:
- 始终使用
/Applications目录中的UiPath.ExtensionControl.Portable.dll文件运行命令,因为对来自其他位置的二进制文件执行操作时,macOS 比较敏感。 - 运行命令之前,关闭所有 Chrome 窗口。
-
打开终端并运行以下命令:
dotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install chrome native-messaging-host-onlydotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install chrome native-messaging-host-only
结果:扩展程序的原生消息传递主机组件已安装。
添加 --ext-id={extensionId} 选项以针对特定扩展程序版本;如果省略,则安装发布到网上应用店的最新版本。有关可用的 ID,请参阅Studio - Chrome 扩展程序列表。
所有用户(仅限原生消息传递主机)
此方法仅为所有用户安装扩展程序的原生消息传递主机组件。它会创建或更新 Chrome 使用的 JSON 配置文件,以允许与原生主机进行通信。
A. 使用 UiPath Assistant 安装步骤
-
访问 UiPath Assistant。
-
选择帐户图标。
-
选择“首选项”。
-
转到 UiPath 扩展程序。
-
使用Google Chrome的下拉列表选择“所有用户(仅限原生消息传递主机)”安装类型。
-
选择“安装” 。
-
在UiPath Assistant 的确认弹出窗口中输入管理员密码。
结果:扩展程序的原生消息传递主机组件已安装。
B. 使用 UiPath.ExtensionControl.Portable.dll(从终端)安装步骤
先决条件:
- 始终使用
/Applications目录中的UiPath.ExtensionControl.Portable.dll文件运行命令,因为对来自其他位置的二进制文件执行操作时,macOS 比较敏感。 - 运行命令之前,关闭所有 Chrome 窗口。
-
打开终端并运行以下命令:
dotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install chrome native-messaging-host-only --scope=machinedotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install chrome native-messaging-host-only --scope=machine
结果:扩展程序的原生消息传递主机组件已安装。
添加 --ext-id={extensionId} 选项以针对特定扩展程序版本;如果省略,则安装发布到网上应用店的最新版本。有关可用的 ID,请参阅Studio - Chrome 扩展程序列表。
卸载
从 UiPath Assistant 卸载
-
访问 UiPath Assistant。
-
转到 UiPath 扩展程序。
-
选择“为 Google Chrome 卸载”。
结果:扩展程序已卸载。
从终端卸载
无论采用哪种安装方法,您都可以通过运行以下命令,卸载 UiPath Chrome 扩展程序:
dotnet UiPath.ExtensionControl.Portable.dll cleanup chrome
dotnet UiPath.ExtensionControl.Portable.dll cleanup chrome
结果:扩展程序已卸载。
检查状态
要查看 Chrome 扩展程序的状态,请根据您的安装方法运行相应的终端命令:
- 当前用户
dotnet UiPath.ExtensionControl.Portable.dll status chromedotnet UiPath.ExtensionControl.Portable.dll status chrome - 所有用户
dotnet UiPath.ExtensionControl.Portable.dll status chrome --scope=machinedotnet UiPath.ExtensionControl.Portable.dll status chrome --scope=machine - 在线组策略
dotnet UiPath.ExtensionControl.Portable.dll status chrome bypolicy --scope=machinedotnet UiPath.ExtensionControl.Portable.dll status chrome bypolicy --scope=machine - 离线组策略
dotnet UiPath.ExtensionControl.Portable.dll status chrome bypolicy --offline --scope=machinedotnet UiPath.ExtensionControl.Portable.dll status chrome bypolicy --offline --scope=machine - 当前用户(仅限原生消息传递主机)
dotnet UiPath.ExtensionControl.Portable.dll status chrome native-messaging-host-onlydotnet UiPath.ExtensionControl.Portable.dll status chrome native-messaging-host-only - 所有用户(仅限原生消息传递主机)
dotnet UiPath.ExtensionControl.Portable.dll status chrome native-messaging-host-only --scope=machinedotnet UiPath.ExtensionControl.Portable.dll status chrome native-messaging-host-only --scope=machine