订阅

UiPath Studio

UiPath Studio 指南

Chrome 扩展程序故障排除

本页介绍了 UiPath Chrome 扩展程序可能无法正常工作的常见原因,以及针对这些问题的解决方案。

检查 Chrome 扩展程序是否已安装并启用

  1. 在 Google Chrome 中,导航到 chrome://extensions/
  2. 请确保已如此处所述安装并启用该扩展程序。
  3. 如果扩展程序安装正确,但不会出现在 Chrome 中,请按照此处所述,检查是否存在影响扩展的组策略。

检查 ChromeNativeMessaging.exe 是否正在运行

ChromeNativeMessaging.exe 支持 UiPath Chrome 扩展程序与 UiPath Studio/UiPath Robot 之间的通信。

  1. 打开 Chrome。
  2. 打开任务管理器。
  3. 检查 ChromeNativeMessaging.exe 进程是否正在运行:
756
  1. 如果该进程未运行:
  • Make sure the extension is installed. For more information on how to install it, check the docs page.
  • Check if there are Group Policies affecting ChromeNativeMessaging.exe. See the docs page for more information.
  • Check if the ComSpec environment variable is defined correctly.

检查 ComSpec 变量是否已正确定义

如果 ComSpec 环境变量缺失或具有无效值,则 Google Chrome 无法启动 ChromeNativeMessaging.exe
解决方案是为 ComSpec 环境变量手动添加正确的值。

此变量在 Windows 安装时设置,其值应为 %SystemRoot%\system32\cmd.exe

1018

启用对文件 URL 和隐身模式的访问权限

默认情况下,该扩展程序未被授予访问文件 URL 或隐身模式的权限。要启用这些权限:

  1. 在 Google Chrome 中,导航到 chrome://extensions/。Chrome 扩展程序页面随即显示。
  2. 导航到 UiPath 网页自动化扩展程序,然后单击“详细信息”按钮。系统将显示“UiPath 网页自动化”详细信息页面。
  3. 确保选中了“允许匿名”和“允许访问文件 URL”选项。
852

多个浏览器配置文件

具有多个用户配置文件的多个 Chrome 实例

UiPath Chrome 扩展程序不支持同时自动化使用多个用户配置文件运行的多个浏览器实例。因此,浏览器自动化要求您关闭 Chrome 的所有活动实例,并使用单个用户配置文件重新启动浏览器。

停止所有 Chrome 实例

在某些情况下,Chrome 后台进程会阻止其完全关闭,即使浏览器实例不可见,这也会干扰自动化。

我们建议通过右键单击系统托盘中的 Chrome 图标,然后选择“退出”来关闭 Chrome。这样可以确保后台不再使用其他用户配置文件。

386

Group Policy conflict

When installing the UiPath extension for Chrome using Group Policy the ExtensionInstallForcelist is updated at the machine level.
This can cause a conflict if the ExtensionInstallForcelist is also defined at the user level or using Chrome Cloud Policies.
由于计算机级别优先,因此将卸载在用户/云级别设置的扩展程序。
To confirm this, check at chrome://policy if this warning is displayed under ExtensionInstallForcelist:
This policy is working as intended but a conflicting value is set elsewhere and is overridden by this policy.

1255

要解决此冲突,请执行以下步骤:

1. Install the UiPath extension for Chrome using the NativeHostOnly installation method.
此安装方法可实现扩展程序与 UiPath Studio/Robot 之间的通信。
它不会对组策略进行任何更改。
To use this installation method add CHROME_INSTALL_TYPE=NativeHostOnly to the installation command for UiPathStudio.msi.
示例:

UiPathStudio.msi ADDLOCAL=DesktopFeature,Studio,Robot,RegisterService,ChromeExtension CHROME_INSTALL_TYPE=NativeHostOnly

2. In the ExtensionInstallForceList policy, add the value:

gflmmjnkmhahgnfcgjckfaekifpehnjk;https://clients2.google.com/service/update2/crx

3. In the NativeMessagingAllowList policy, add the value:

com.uipath.chromenativemsg_v2

4. Set DeveloperToolsAvailability Group Policy to the value 1 (Allow usage of the Developer Tools).
需要此设置才能启用扩展程序的完整功能。
For more information about this setting, please see this troubleshooting section.

特定于 MV3 扩展程序的已知问题

在特定网页元素上使用“模拟”的“单击”活动失败

The Click activity with the Simulate input method no longer works on HTML elements that have a click handler with javascript: URI.

1027

在这种情况下,模拟点击将不会生效,也不会报告任何错误。
This was reported as a Chromium bug. This issue is quite rare as very few HTML elements have click handlers in this form.

解决方法

此问题有两种解决方法:

  1. Identify the failing Click activity in your workflow and change the input method from Simulate to any other input method (Chromium API, Hardware Events, Window Messages).

  2. Upgrade to UiPath.UIAutomation.Activities package v22.12 or newer and use the Enable workaround for simulate click with MV3 extension option in Project Settings.

“开发者工具可用性”组策略值必须设置为 1

The DeveloperToolsAvailability has the following possible values:

  • 0 = 不允许在企业策略安装的扩展程序上使用开发者工具,允许在其他上下文中使用开发者工具
  • 1 = 允许使用开发者工具
  • 2 = 禁止使用开发者工具

If the UiPath Extension for Chrome is installed using Group Policy, then the DeveloperToolsAvailability must be set to 1 to enable the full functionality of the extension.
安装扩展程序时,系统会自动正确设置此值,但如果系统管理员为此策略设置了其他值,则系统会覆盖此值。

The other values for DeveloperToolsAvailability cause the problems listed below.
If DeveloperToolsAvailability is set to 0 then:

  • UiPath Chrome 扩展程序 v22.4 根本无法使用此限制。请考虑升级到随 UiPathStudio.msi 2022.4.4 提供的扩展程序的 v22.10。
  • The UiPath Extension for Chrome v22.10 will be restricting to working with LTS versions of UiAutomation (19.10.x, 20.10.x, 21.10.x, 22.4.x, 22.10.x)
  • The InjectJS Activity will not work.

If DeveloperToolsAvailability is set to 2 then:

  • DeveloperToolsAvailability=0 中的所有限制均适用
  • The ChromiumAPI input method will not work.

UiPath 网页自动化浏览器窗口显示警告

如果无法启动 ChromeNativeMessaging.exe,UiPath 网页自动化浏览器窗口将显示以下警告:

Cannot communicate with UiPath Platform
The native part of the extension is not configured correctly.
Re-install the extension from UiPath Studio.
626

Check the Troubleshooting guide for ChromeNativeMessaging.exe.

无法再使用“注入 JS 脚本”活动来访问页面变量和代码

By default, the Inject Js Script activity can no longer be used to access page variables, such as jQuery $, or to interact with page code (e.g., window.alert). The Inject Js Script activity won't report an error, but the script will fail to execute and the following error will be reported in the browser DevTools (F12):
Refused to execute inline script because it violates the following Content Security Policy directive

1060

这是 MV3 平台引入的限制。

To fix this issue, select the Execution world - Page option from the Inject Js Script activity.
This property is available starting with UiPath.UIAutomation.Activities v22.12.0-preview.
Your existing JavaScript code doesn't require any changes, and by using the Execution world - Page option it will work for both MV2 and MV3 extensions.

约一个月前更新


另请参阅

Chrome 组策略

Chrome 扩展程序故障排除


建议的编辑仅限用于 API 参考页面

您只能建议对 Markdown 正文内容进行编辑,而不能建议对 API 规范进行编辑。