UiPath Documentation
robot
2023.10
false
Robot 开发者指南
  • Robot JavaScript SDK
    • 关于 Robot JavaScript SDK
    • 配置步骤
      • 设置字段
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

设置字段

Settings class fields for the Robot JavaScript SDK browser add-on: port number, poll interval, telemetry toggle, and application origin configuration.

SDK 的设置

Robot JavaScript SDK 的“设置”属性使您可以个性化并改善对浏览器插件设置的控制。

class Settings {
  portNumber: number;
  pollTimeInterval: number;
  disableTelemetry: boolean;
  appOrigin: string;
}
class Settings {
  portNumber: number;
  pollTimeInterval: number;
  disableTelemetry: boolean;
  appOrigin: string;
}
属性描述
portNumberLets you configure custom ports on which the back-end services run on. The default port number is 2323. Only available for Enterprise installations.
pollTimeIntervalLets you 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
disableTelemetryLets you disable the telemetry flag. The default value is false.
appOriginLets you specify the application which uses the SDK. The default value is picked up from the window.location.origin class.
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';

插件设定

Add-on settings are configured in the uipath.config file in the %ProgramFiles%\UiPath\Studio folder.

The configuration file must contain the following:

<robotJsSettings>
    <add key="ListenerPort" value="2323" />
    <add key="TokenExpiryInDays" value="30" />
</robotJsSettings>
<robotJsSettings>
    <add key="ListenerPort" value="2323" />
    <add key="TokenExpiryInDays" value="30" />
</robotJsSettings>
属性描述
ListenerPortThe UiPath.RobotJS.ServiceHost.exe starts a HttpListener on the configured port and contains the information about other local listeners from the active user session on that system. The port value must match the one configured in the SDK Settings.
TokenExpiryInDays来自新域的任何请求都需要获得用户的同意,以允许从网页应用程序访问 UiPath 机器人。这些同意在此设置中提到的上述天数内有效。

默认覆盖

It is possible to customize the consent screen displayed when a request is raised from a new domain. Two screens are delivered with the Robot JavaScript SDK:

当从新域提出访问 UiPath 助理的请求时,将显示 consent-prompt 覆盖。

缺少组件

当本地计算机上不存在所需插件时,将显示 missing-components 覆盖。

Overlay messages can be configured as shown in the following example.

// 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') });
  • SDK 的设置
  • 插件设定
  • 默认覆盖
  • 同意提示
  • 缺少组件

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新