- 发行说明
- 入门指南
- UiPath Assistant
- 安装和升级
- 机器人类型
- 机器人组件
- 许可
- 将机器人连接到 Orchestrator
- 流程与活动
- 日志记录
- Robot JavaScript SDK
- 特定场景
- 故障排除
Robot JavaScript SDK 的“设置”属性使您可以个性化并改善对浏览器插件设置的控制。
class Settings {
portNumber: number;
pollTimeInterval: number;
disableTelemetry: boolean;
appOrigin: string;
}
class Settings {
portNumber: number;
pollTimeInterval: number;
disableTelemetry: boolean;
appOrigin: string;
}
| 属性 | 描述 |
|---|---|
portNumber | Allows you to configure custom ports on which the back-end services run on. The default port number is 2323. Please note that this is only available for Enerprise installations. |
pollTimeInterval | 允许您指定 Robot JavaScript SDK 持续跟踪网页中流程执行的经过时间(以毫秒为单位)。默认值为 250 毫秒。此值可确定网页浏览器的轮询频率 |
disableTelemetry | 允许您禁用遥测标志。默认值为 false。 |
appOrigin | 允许您指定使用 SDK 的应用程序。默认值从 window.location.origin 类别中选取。 |
const robot = UiPathRobot.init();
robot.settings.portNumber = 1234;
robot.settings.pollTimeInterval = 1000;
robot.settings.disableTelemetry = true;
robot.settings.appOrigin = 'MyApp';
const robot = UiPathRobot.init();
robot.settings.portNumber = 1234;
robot.settings.pollTimeInterval = 1000;
robot.settings.disableTelemetry = true;
robot.settings.appOrigin = 'MyApp';
SDK 的设置
class Settings {
portNumber: number;
pollTimeInterval: number;
disableTelemetry: boolean;
appOrigin: string;
}
class Settings {
portNumber: number;
pollTimeInterval: number;
disableTelemetry: boolean;
appOrigin: string;
}
| 属性 | 描述 |
|---|---|
portNumber | 允许您配置运行后端服务的自定义端口。默认端口号为 2323。请注意,这仅适用于企业版安装。 |
pollTimeInterval | Allows you to specify the time in milliseconds in which the Robot JavaScript SDK keeps track of a process execution from a web page. The default value is 250 milliseconds. This value determines the polling frequency from the web browser |
disableTelemetry | 允许您禁用遥测标志。默认值为 false。 |
appOrigin | 允许您指定使用 SDK 的应用程序。默认值从 window.location.origin 类别中选取。 |
const robot = UiPathRobot.init();
robot.settings.portNumber = 1234;
robot.settings.pollTimeInterval = 1000;
robot.settings.disableTelemetry = true;
robot.settings.appOrigin = 'MyApp';
const robot = UiPathRobot.init();
robot.settings.portNumber = 1234;
robot.settings.pollTimeInterval = 1000;
robot.settings.disableTelemetry = true;
robot.settings.appOrigin = 'MyApp';
插件设定
若要更改插件设置,需要在“机器人插件”文件夹中创建名为 RobotJSAddOn.config 的配置文件,即:
C:\ProgramData\UiPath\Robot JS Add-on\RobotJSAddOn.config
配置文件需要包含以下内容:
<?xml version="1.0" encoding="utf-8"?>
<appSettings>
<add key="ListenerPort" value="2323" />
<add key="PortDiscoveryServiceEndpoint" value="http://127.0.0.1:2323" />
<add key="TokenExpiryInDays" value="30" />
<add key="AuthenticationProtocol" value="Custom" />
</appSettings>
<?xml version="1.0" encoding="utf-8"?>
<appSettings>
<add key="ListenerPort" value="2323" />
<add key="PortDiscoveryServiceEndpoint" value="http://127.0.0.1:2323" />
<add key="TokenExpiryInDays" value="30" />
<add key="AuthenticationProtocol" value="Custom" />
</appSettings>
| 属性 | 描述 |
|---|---|
|
|
|
|
|
|
|
|
Any request coming from a new domain needs to have consent from the user to allow access of UiPath® Robots from a web application. These consents are valid for the said number of days mentioned in this setting. |
|
|
Http 侦听器实例之间使用加密的用户信息进行通信。默认情况下,我们的自定义加密用于确定机器人请求中的用户信息。将此值更改为
|
默认覆盖
It is possible to customize the consent screen displayed when a request is raised from a new domain. There are currently two screens that are delivered with the Robot JavaScript SDK:
同意提示
The consent-prompt overlay is displayed when a request to access the UiPath® Assistant is raised from a new domain.
缺少组件
当本地计算机上不存在所需插件时,将显示 missing-components 覆盖。
可以按照下方示例配置覆盖消息。
// Consent code will be written to the console instead of showing default overlay
// Error logged to console when required components are missing insread of showing
// default error overlay
const robot = UiPathRobot.init();
robot.on('consent-prompt', function(consentCode){ console.log(consentCode) });
robot.on('missing-components', function(){ console.log('Missing components') });
// Consent code will be written to the console instead of showing default overlay
// Error logged to console when required components are missing insread of showing
// default error overlay
const robot = UiPathRobot.init();
robot.on('consent-prompt', function(consentCode){ console.log(consentCode) });
robot.on('missing-components', function(){ console.log('Missing components') });